-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemail.php
More file actions
executable file
·44 lines (37 loc) · 913 Bytes
/
email.php
File metadata and controls
executable file
·44 lines (37 loc) · 913 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
33
34
35
36
37
38
39
40
41
42
43
44
<?
$feedback = "";
if (isset($_POST['name']) && isset($_POST['email']) && isset($_POST['message'])) {
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
if ($name && $email && $message) {
$to = "dumaworks@gmail.com";
$subject = 'Message from: ' .$name;
$headers = 'From: '.$name.'<'.$email.'>' . "\r\n";
$headers .= 'Cc: ' . "\r\n";
//$headers .= 'Bcc: qtoeric@gmail.com' . "\r\n";
// Mail it
$result = mail($to, $subject, $message, $headers);
if($result)
{
header("location:contact.php");
}
else
{
$feedback = "2";
}
}
else {
$feedback = "1";
}
}
else {
$feedback = "1";
}
if ($feedback) {
header("location:contact_us.php?B$@4it=$feedback");
}
else {
header("location:contact.php");
}
?>