-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmail.php
More file actions
32 lines (25 loc) · 780 Bytes
/
mail.php
File metadata and controls
32 lines (25 loc) · 780 Bytes
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
<?php
$to = 'demo@spondonit.com';
$name = $_POST["name"];
$email= $_POST["email"];
$guests= $_POST["guests"];
$phone= $_POST["meal"];
$notes= $_POST["notes"];
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= "From: " . $email . "\r\n"; // Sender's E-mail
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$message ='<table style="width:100%">
<tr>
<td>'.$name.' '.$email.'</td>
</tr>
<tr><td>Email: '.$guests.'</td></tr>
<tr><td>phone: '.$meal.'</td></tr>
<tr><td>Text: '.$notes.'</td></tr>
</table>';
if (@mail($to, $email, $message, $headers))
{
echo 'The message has been sent.';
}else{
echo 'failed';
}
?>