-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontact_process.php
More file actions
53 lines (44 loc) · 1.82 KB
/
contact_process.php
File metadata and controls
53 lines (44 loc) · 1.82 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
<?php
// $to = "dagmawiamanuel@gmail.com";
// $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>";
// $send = mail($to, $subject, $body, $headers);
if (!empty($_POST["send"])) {
$to = "f@gmail.com";
$from = $_POST['email'];
$name = $_POST['name'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$mailHeaders = "Name: " . $name .
"\r\n Email: " . $from .
"\r\n Subject: " . $subject .
"\r\n Message: " . $message . "\r\n";
if(mail($to, $name, $mailHeaders)) {
$message = "Your info is received."
}
}
?>