- Impact
- 338
Hi everybody,
I tried to add an autorespond message to one of my php forms, and it worked...
(and that is exciting because i am not a programmer at all, my php knowledge stops after"hello world")
But.....the sender who fills out my form receives the autoresponder from "nobody" send with my servername emailaddress (e.g Nobody [[email protected]] )...i would like that to be from the email address defined in $to
Anybody out to my rescue?
Here is the code:
<?php
$betreff = "Booking Form";
$to = "[email protected]";
$sender = "From: $email<$email>";
$mailbody = "From: $fname $lname\n";
$mailbody = $mailbody."company $company\n";
$mailbody = $mailbody."phonenumber:$phone\n";
$mailbody = $mailbody."eMail: $email\n\n";
$mailbody = $mailbody."phone2: $phone2\n\n";
$mailbody = $mailbody."Event Date: $eventdate\n\n";
$mailbody = $mailbody."Event Time: $eventtime\n\n";
$mailbody = $mailbody."Duration: $duration\n\n";
$mailbody = $mailbody."Number of People: $people\n\n";
$mailbody = $mailbody."Kind opf Event: $eventkind\n\n";
$mailbody = $mailbody."Private Area : $private\n\n";
$mailbody = $mailbody."Providing Drinks : $drinks\n\n";
$mailbody = $mailbody."Providing Food: $food\n\n";
$mailbody = $mailbody."Special Needs : $specials\n\n";
$mailbody = $mailbody."Special Needs : $specials1\n\n";
$mailbody = $mailbody."Special Needs : $specials2\n\n";
$mailbody = $mailbody."Special Needs : $specials3\n\n";
$mailbody = $mailbody."Special Needs : $specials4\n\n";
$mailbody = $mailbody."Special Needs : $specials5\n\n";
$mailbody = $mailbody."Special Needs : $specials6\n\n";
$mailbody = $mailbody."Comment : $comment";
mail($to, $betreff, $mailbody, $sender);
mail($sender, "this is an autoresponder");
?>
Cheers
Frank
I tried to add an autorespond message to one of my php forms, and it worked...
(and that is exciting because i am not a programmer at all, my php knowledge stops after"hello world")
But.....the sender who fills out my form receives the autoresponder from "nobody" send with my servername emailaddress (e.g Nobody [[email protected]] )...i would like that to be from the email address defined in $to
Anybody out to my rescue?
Here is the code:
<?php
$betreff = "Booking Form";
$to = "[email protected]";
$sender = "From: $email<$email>";
$mailbody = "From: $fname $lname\n";
$mailbody = $mailbody."company $company\n";
$mailbody = $mailbody."phonenumber:$phone\n";
$mailbody = $mailbody."eMail: $email\n\n";
$mailbody = $mailbody."phone2: $phone2\n\n";
$mailbody = $mailbody."Event Date: $eventdate\n\n";
$mailbody = $mailbody."Event Time: $eventtime\n\n";
$mailbody = $mailbody."Duration: $duration\n\n";
$mailbody = $mailbody."Number of People: $people\n\n";
$mailbody = $mailbody."Kind opf Event: $eventkind\n\n";
$mailbody = $mailbody."Private Area : $private\n\n";
$mailbody = $mailbody."Providing Drinks : $drinks\n\n";
$mailbody = $mailbody."Providing Food: $food\n\n";
$mailbody = $mailbody."Special Needs : $specials\n\n";
$mailbody = $mailbody."Special Needs : $specials1\n\n";
$mailbody = $mailbody."Special Needs : $specials2\n\n";
$mailbody = $mailbody."Special Needs : $specials3\n\n";
$mailbody = $mailbody."Special Needs : $specials4\n\n";
$mailbody = $mailbody."Special Needs : $specials5\n\n";
$mailbody = $mailbody."Special Needs : $specials6\n\n";
$mailbody = $mailbody."Comment : $comment";
mail($to, $betreff, $mailbody, $sender);
mail($sender, "this is an autoresponder");
?>
Cheers
Frank




