-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact_process.php
executable file
·74 lines (64 loc) · 2.47 KB
/
contact_process.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
<?php
$reciever_1 = "[email protected]";
$reciever_2 = "[email protected]";
$reciever_3 = "[email protected]";
$reciever_4 = "[email protected]";
$reciever_5 = "[email protected]";
$from = $_REQUEST['email'];
$name = $_REQUEST['name'];
$subject = $_REQUEST['subject'];
$number = $_REQUEST['number'];
$cmessage = $_REQUEST['message'];
$headers = "From: $from";
$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";
// $subject = "You have a message from your Bitmap Photography.";
$logo = 'img/logo.png';
$link = '#';
$body = "<!DOCTYPE html><html lang='en'><head><meta charset='UTF-8'><title>Express Mail</title></head><body>";
$body .= "<table style='width: 100%;'>";
$body .= "<thead style='text-align: center;'><tr><td style='border:none;' colspan='2'>";
$body .= "<a href='{$link}'><img src='{$logo}' alt=''></a><br><br>";
$body .= "</td></tr></thead><tbody><tr>";
$body .= "<td style='border:none;'><strong>Name:</strong> {$name}</td>";
$body .= "<td style='border:none;'><strong>Email:</strong> {$from}</td>";
$body .= "</tr>";
$body .= "<tr><td style='border:none;'><strong>Subject:</strong> {$csubject}</td></tr>";
$body .= "<tr><td></td></tr>";
$body .= "<tr><td colspan='2' style='border:none;'>{$cmessage}</td></tr>";
$body .= "</tbody></table>";
$body .= "</body></html>";
$status_1 = mail($reciever_1, $subject, $body, $headers);
if (!$status_1) {
$errorMessage = error_get_last()['message'];
return $errorMessage;
}
echo $status_1;
$status_2 = mail($reciever_2, $subject, $body, $headers);
if (!$status_2) {
$errorMessage = error_get_last()['message'];
return $errorMessage;
}
echo $status_2;
$status_3 = mail($reciever_3, $subject, $body, $headers);
if (!$status_3) {
$errorMessage = error_get_last()['message'];
return $errorMessage;
}
echo $status_3;
$status_4 = mail($reciever_4, $subject, $body, $headers);
if (!$status_4) {
$errorMessage = error_get_last()['message'];
return $errorMessage;
}
echo $status_4;
$status_5 = mail($reciever_5, $subject, $body, $headers);
if (!$status_5) {
$errorMessage = error_get_last()['message'];
return $errorMessage;
}
echo $status_5;
?>
?>