-
Notifications
You must be signed in to change notification settings - Fork 0
/
contactemail.php
132 lines (110 loc) · 4.71 KB
/
contactemail.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?php
if(isset($_POST['submit']))
{
//This page should not be accessed directly. Need to submit the form.
//echo "error; you need to submit the form!";
$name = $_POST['name'];
$visitor_email = $_POST['email'];
$visitor_mobile = $_POST['mobile'];
$message = $_POST['message'];
$subject =$name." is requesting services from your website contact page";
$from = $visitor_email;
// $to="[email protected]";
$to="[email protected]";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=utf-8\r\n";
// $headers .= "To: ".$to."\r\n";
$headers .= "From: ".$name." <".$from.">\r\n";
$headers .= "Reply-To: ".$name." <".$from.">\r\n";
$headers .= "Return-Path: ".$name." <".$from.">\r\n";
$message='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Queens NRI</title>
<style type="text/css">
body,
td,
th {
/* font-family: Geneva, Arial, Helvetica, sans-serif;*/
font-family: Oxygen, Helvetica Neue, Arial, sans-serif !important;
font-size: 14px;
}
body {
background-color: #FFFFFF;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.even {
background-color: #f3f3f3;
}
</style>
</head>
<body>
<div>
<table width="1000" border="1" align="center" cellpadding="0" cellspacing="0" style=" border-radius: 5px;border-color:#0076BE;bgcolor:#FFFFFF">
<tbody>
<tr>
<td height="50">
<table width="95%" border="0" align="center" cellpadding="5" style=" border-radius: 5px;" cellspacing="0">
<tr>
<td align="left" colspan="3"><span style="color: #000000; border-bottom:#999999 1px solid;"><strong><h3>Following are the Appointment Details</h3></strong></span></td>
</tr>
<tr class="even" style="background-color: #f3f3f3;">
<td align="left" style="width :20%"><strong>Name</strong>
</td>
<td align="left" style="width :5%"><strong>:</strong>
</td>
<td align="left"><strong>'.$name.'</strong>
</td>
</tr>
<tr>
<td align="left" style="width :20%"><strong>Email ID</strong>
</td>
<td align="left" style="width :5%"><strong>:</strong>
</td>
<td align="left"><strong>'.$visitor_email.'</strong>
</td>
</tr>
<tr class="even" style="background-color: #f3f3f3;">
<td align="left" style="width :20%"><strong>Mobile</strong>
</td>
<td align="left" style="width :5%"><strong>:</strong>
</td>
<td align="left"><strong>'.$visitor_mobile.'</strong>
</td>
</tr>
<tr>
<td align="left" style="width :20%"><strong>Message</strong>
</td>
<td align="left" style="width :5%"><strong>:</strong>
</td>
<td align="left"><strong>'.$message.'</strong>
</td>
</tr>
<tr>
<td align="left">
</td>
</tr>
<tr>
<td align="left" colspan="3" style="border-bottom:#999999 1px solid"> </td>
</tr>
<tr>
<td align="left" colspan="3">Have a question? <strong>Contact us</strong>. Do not reply to this email.</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
';
mail( $to,$subject,$message,$headers);
//done. redirect to thank-you page.
header('Location: thank-you.html');
}
?>