-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmail.php
51 lines (39 loc) · 1.37 KB
/
mail.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
<?php
/*
* @CODY-BY-ARMAN
* V1.0
*/
// The Mail will go to Here #######################################
$mail_to= '[email protected]';
// The Email will go from #######################################
$mail_from = "[email protected]";
// After Submitting The Email Where Need to go back...?
$go_back = "https://www.bottlesforbales.org/";
if(isset($_POST['send_to_email'])){
$number_of_bag = $_POST['number_of_bag'];
$select_country = $_POST['select_country'];
$name = $_POST['name'];
$streetAddress = $_POST['streetAddress'];
$phoneNumber = $_POST['phoneNumber'];
$bagLocation = $_POST['bagLocation'];
$subject = 'Form Submition';
$message = '<h3>Submited Form Information------------></h3>
<b>Number of Bags:</b> '. $number_of_bag . '<br>
<b>County:</b> '. $select_country . '<br>
<b>Name:</b> '. $name . '<br>
<b>Street Address:</b> '. $streetAddress . '<br>
<b>Phone Number:</b> '. $phoneNumber . '<br>
<b>Bag Location:</b> '. $bagLocation . '<br>
';
$headers = 'From: '. $mail_from . "\r\n" .
'Reply-To: '. $mail_from . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if( mail($mail_to, $subject, $message, $headers) ){
$submited = 'true';
}else{
$submited = 'false';
}
echo $message;
}
header( "Location: $go_back?mail-submited=$submited" );
?>