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("my@email.com", $subject, $message, $from);

?>

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

?>
<!-- display information on web page -->
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.