-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmail.php
executable file
·81 lines (42 loc) · 1.07 KB
/
mail.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
<?php
if(isset($_POST['submit']))
{
$to = "rahul@sparkinfosystems.com";
$subject = "Enquiry Form";
$message = "Hi,<br>Sir/Madam";
$message .= "<br>Greetings";
$message .= "<br><br>
<table width='300' cellspacing='0' cellpadding='4' border='1'>
<tbody>
<tr>
<td align='right'>Name :</td>
<td>".$_REQUEST["userName"]."</td>
</tr>
<tr>
<td align='right'>Email Id :</td>
<td>".$_REQUEST["userEmail"]."</td>
</tr>
<tr>
<td align='right'>Mobile No. :</td>
<td>".$_REQUEST["userPhone"]."</td>
</tr>
</tbody>
</table>";
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/html\r\n";
$retval = mail ($to,$subject,$message,$header);
if( $retval == true )
{
header("Location: thankyou.html");
}
else
{
?>
<script language="javascript">
alert("Sorry! Form Not Submited.");
window.location.href="<?php echo $_SERVER['HTTP_REFERER'];?>";
</script>
<?php
}
}
?>