Jump to content

another email thing


gene0

Recommended Posts

Hi Guys
I am using PHP 4 on nix box.
I have client fillout form then I get a copy of info from form and I want to send client something just to say thank you and I will be intouch soon. What I have come up with send mail to me and then sends a copy to client that is the same thing I get and sends it from server name not my email address.

<div id="Layer1"><!-- validated tranport info -->
<?php
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
{
echo "<h2>Use Back - Enter valid e-mail</h2>\n";
$badinput = "<h2>Feedback was NOT submitted</h2>\n";
}
if(empty($company) || empty($contact) || empty($visitormail) || empty($notes )) {
echo "<h2>Use Back - fill in all fields</h2>\n";
}
/* here we display bad input info */
echo $badinput;

$todayis = date("l, F j, Y, g:i a") ;

$company = $company ;
$contact = $contact ;
$subject = "Power Only";

$notes = stripcslashes($notes);

$message = " $todayis [EST] \n

Company: $company \n
Contact: $contact \n
Email: $visitormail \n
Phone: $phone \n
Trailer Type: $trailer_type \n
Hitch: $hitch \n
Light Bar: $lights \n
Inspection: $inspection \n
Pick Up Date: $pickup \n
Origin City: $origin_city \n
Origin: $origin_state \n
Destination City $dest_city \n
Destination State: $dest_state \n
Message: $notes \n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";

$from = "From: $visitormail\r\n";


mail("[email protected]", $subject, $message, $from);

?>

/* send mail to client */
<?php
$from="[email protected]";
mail ($visitormail, $subject, $message);
Thank You We will be intouch Soon

?>
<!-- display information on web page -->
Link to comment
https://forums.phpfreaks.com/topic/34512-another-email-thing/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.