-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmailform.php
89 lines (73 loc) · 2.25 KB
/
mailform.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?
header('Refresh: 3; URL=http://www.aclor.com');
$adminaddress = "[email protected]";
$cc="";
$Bcc="";
$siteaddress ="http://www.aclor.com/";
$sitename = "Aclor Inc";
//No need to change anything below ...
// Gets the date and time from your server
$date = date("m/d/Y H:i:s");
// Gets the IP Address
if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);
// Gets the POST Headers - the Flash variables
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$company = $_POST['company'] ;
$subject = $_POST['subject'] ;
$comments = $_POST['comments'] ;
//Process the form data!
// and send the information collected in the Flash form to Your nominated email address
if ($email != "" && $comments != "" && $subject != "") {
//
mail ("$adminaddress","[email protected]",
"$name has visited $sitename and has left the following information\n
Name: $name
Email: $email
IP From: $ip
The visitor $name coment:
------------------------------
$comments
------------------------------" ) ;
mail ("$Bcc","",
"$name has visited $sitename and has left the following information\n
Name: $name
Email: $email
IP From: $ip
The visitor $name coment:
------------------------------
$comments
------------------------------" ) ;
mail ("$cc","",
"$name has visited $sitename and has left the following information\n
Name: $name
Email: $email
IP From: $ip
The visitor $name coment:
------------------------------
$comments
------------------------------" ) ;
/* Logged Info :
------------------------------
Using: $HTTP_USER_AGENT
Hostname: $ip
IP address: $REMOTE_ADDR
Date/Time: $date","FROM:$adminaddress" ) ;
*/
//This sends a confirmation to your visitor
mail ("$email","Thanks for visiting Aclor Inc.",
"$name,\n
Thanks for your interest in Aclor Inc. We'll get in touch as soon as possible.
$sitename
$siteaddress","FROM:$adminaddress") ;
//Confirmation is sent back to the Flash form that the process is complete
$sendresult = "Thanks. Soon you will get an email confirmation.";
$send_answer = "answer=";
$send_answer .= rawurlencode($sendresult);
echo $sendresult;
}
else {
print "It seems that you forgot something required !! <br/>";
}
?>