Sending auto reply using PHP form

  lonemascot 09:25 AM 08 Dec 10
Locked

I have a form and its working ok apart from the fact my autoreply doesn't.

I can send the form results to my email fine but i also want to send an email to the customer stating that i have recieved their information etc.

here is my releveant code

?php

$to = "[email protected]" ;

$title = $_REQUEST ["title"] ;
$other = $_REQUEST ["other"] ;
$forename = $_REQUEST ["forename"] ;
$surname = $_REQUEST ["surname"] ;


$autoreply = "[email protected]";
$autoreplymsg = "Thank you $title $other $surname\n
\n
We have received your quotation request and shall be dealing with it shortly.\n
\n
Thank you\n
\n
The sales team\n
\n
This email was sent from an un-monitored address please do not reply to this message.\n
All of our contact details can be found at click here";


$body = "Customer name: ".$title. $other. $forename. $surname."\n
Address:
\n ".$address1." \n
".$address2." \n
".$town." \n
".$county." \n
".$postcode." \n
Email: ".$from." \n
Telephone: ".$contact."\n
Email: ".$email."\n
A: ".$a." m ".$edgea."\n
B: ".$b." m ".$edgeb."\n
C: ".$c." m ".$edgec."\n
D: ".$d." m ".$edged."\n
E: ".$e." m ".$edgee."\n
F: ".$f." m ".$edgef."\n\n

Additional comments: ".$comment." \n\n

Respond via: ".$response."\n ";

mail( $to, "Flat roof quote", $body, "From: ".$email."");

mail( $email, "Thank you for your quotation request", $autoreplymsg, "From: ".$autoreply."");

header( "Location: $thankyou" );

exit;

?>


I have removed most of the irrelevant code and changed the emails for security reasons.

Please forgive my lack of knowledge as its my script and I'm learning as i go.

how do i send to both of the mail = ()?

  Ansolan 02:22 AM 10 Dec 10

Hi
Might be easier to use a specific email address for the form and set up an Auto-Responder at your domain. You should find this available in Cpanel, or similar systems.

  lonemascot 01:15 AM 12 Dec 10

Thanks for your help. I managed to work out what I needed to do in the end. I wanted to use fields from the form such as customer name and what they had input in my autoreply so couldn't do that via c panel.

PHP is a lot less complicated than i had previously thought and i love all the cool things you can do with it.

thanks again

  wholesale handbags 11:06 AM 16 May 11

This beautifully designed white designer handbags was conceived and crafted in Italy. Very charming and stylish for any occasion. There are a limited number of pieces available for this wholesale handbags, so don't lose your chance to own one of the most sought-after cheap designer handbags to your personal collection. wholesale designer handbags new with tags, 93%-cotton, 7%-elastane?Welcome to our discount designer handbags store. Have a good day.cheap handbags for you !ZXZxXZX

  lotvic 11:57 AM 16 May 11

wholesale handbags is SPAMMER, hopefully FE will look at his Profile and delete all of his posts

Advertisement

This thread is now locked and can not be replied to.

How to get free stuff for Android: Amazon Underground offers genuinely free Android apps and free…

1995-2015: How technology has changed the world in 20 years

Swedish schoolkids use Minecraft to redesign Stockholm city centre

Apple's special event invitations decoded: A look back at 13 of Apple's most cryptic invites