-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmailingList.php
executable file
·45 lines (34 loc) · 1.14 KB
/
mailingList.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
<?php
$this_form_spam = $_POST['this_title'];
if(!empty($_POST['mailingName']) && !empty($_POST['mailingEmail']))) {
if ($this_form_spam == "") {
// process the form and send email
$field_name = $_POST['name'];
$field_email = $_POST['email'];
$field_phone = $_POST['phone'];
$field_subject = $_POST['subject'];
$field_message = $_POST['message'];
$mail_to = '[email protected]';
$subject = "Message recieved from the Eli's Web site visitor ".$field_name;
$body_message = 'Name: '.$field_name."\n";
$body_message .= 'E-mail: '.$field_email."\n";
$body_message .= 'Phone: '.$field_phone."\n";
$body_message .= 'Subject: '.$field_subject."\n";
$body_message .= 'Message: '.$field_message;
$headers = 'From: '.$field_email."\r\n";
$headers .= 'Reply-To: '.$field_email."\r\n";
$success = mail($mail_to, $subject, $body_message, $headers);
if ($success){
print '<meta http-equiv="refresh" content="0; url=thankyou.html" />'; // redirect to success page
}
}
else
{
$success = 0;
if ($success == 0){
print '<meta http-equiv="refresh" content="0; url=thankyou.html" />'; // redirect to success page
}
}
else {
}
?>