Repository navigation
Expand file tree
/
Copy pathemailing.php
More file actions
56 lines (51 loc) · 2.14 KB
/
Copy pathemailing.php
File metadata and controls
56 lines (51 loc) · 2.14 KB
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
<?php
//fetch data from enquiry form
$name = $_POST['fullname'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
/*echo $name."<br/>";
echo $email."<br/>";
echo $phone."<br/>";
echo $message."<br/>"; */
$to = $email;
$from = "admin@devconacademia.com";
$subject = 'Your Enquiry Has Been Sent';
$headers = "From: " . $from . "\r\n";
$headers .= "Reply-To: ".$from . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$message = '<html><head></head><body>';
$message .= '<table width="900" align="center" cellpadding="0" cellspacing="0" style="border:3px solid #ddd; font-family: arial, sans-serif;">
<thead>
<tr>
<th style="text-align:middle; padding-top:25px; padding-bottom:25px;"><h1 style="margin:0; padding:0;"><img src="http://dynamicdune.com/uat/devcon/img/devcon-academia.png" style="width:400px;"></h1></th>
</tr>
<tr>
<th style="background:#fcfcfc; color: grey; text-align:center; padding-top:30px; padding-bottom:30px;"><h2 style="margin:0; padding:0;">Thank you for sending us an enquiry.</h2></th>
</tr>
</thead>
<tbody>
<tr>
<td style="color: rgb(165,176,184); padding:25px 35px">
<p>Dear '.$name.',</p>
<p>This is an automated reply to acknowledge enquirer that their email has been sent. Kindly be patient as we will answer your question soon. For a moment, do enjoy a cup of coffee or be awesome in wherever you be.</p>
<p>Wanna know more about our event? Check us out at: <a href="https://www.facebook.com/devconcommunity/" style="color:cornflowerblue;" target="_blank">https://www.facebook.com/devconcommunity/</a></p>
<p>Sincerely,<br/>Joe Daft</p>
</td>
</tr>
<tr>
<td style="background:#fcfcfc; color: grey; font-size:12px; text-align:center; padding:25px 35px">
<span>Devcon Community: Block 3730, Persiaran Apec, Cyberjaya, Selangor 63000, Malaysia </span>
</td>
</tr>
</tbody>
</table>';
$message .= '</body></html>';
// Sending email
if(mail($to, $subject, $message, $headers)){
header('Location: index.php');
} else{
header('Location: index.php');
}
?>