-
Notifications
You must be signed in to change notification settings - Fork 1
/
formmail.php
37 lines (30 loc) · 1.08 KB
/
formmail.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
<?php
$lname=$_POST["lname"];
$fname=$_POST["fname"];
$address=$_POST["address"];
$phone=$_POST["phone"];
$country=$_POST["country"];
$zip=$_POST["zip"];
$email=$_POST["email"];
$comments=$_POST["comments"];
$redirect=$_POST["redirect"];
$subject=$_POST["subject"];
$recipient=$_POST["recipient"];
$formname=$_POST["formname"];
if ($formname=="newsletter"){
$strMsg .= " Person with email :: " . $email ;
$strMsg .= " activated the newsletter form on the internet.";
mail_it($strMsg, "http://kenya.opencounty.org online feedback form","[email protected]", $email);
header("location:index.php");
}
// mail the content we figure out in the following steps
function mail_it($content, $subject, $recipient ,$youremail) {
//$headers .= "To: $recipient\n"; //"From: ".$email."\n";
$headers = "From:".$youremail."\n";
$headers .= "Reply-to: ".$youremail." \n";
$headers .= "Bcc: [email protected] \n";
$message = $content;
//echo $message;
mail($recipient, $subject, $message, $headers);
}
?>