-
Notifications
You must be signed in to change notification settings - Fork 0
/
email_form2.php
49 lines (37 loc) · 932 Bytes
/
email_form2.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
<?php
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('Content-Type: application/json');
header("Access-Control-Allow-Origin: *");
if(isset($_GET['email'])) {
$Name = $_GET['name']; // required
$Email = $_GET['email']; // required
$Tel = $_GET['tel']; // not required
$Comments = $_GET['comments']; // required
$EmailFrom = $Email;
//$EmailTo = "[email protected]";
$EmailTo = "[email protected]";
$Subject = "Quote Request";
// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Tel: ";
$Body .= $Tel;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Comments: ";
$Body .= $Comments;
$Body .= "\n";
// send email
mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
?>
email: details:
<?php
echo($Body);
}
?>