We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message
Contact Forum Editor

Send an email to our Forum Editor:

PLEASE NOTE: Your name is used only to let the Forum Editor know who sent the message. Both your name and email address will not be used for any other purpose.

Tech Helproom

It's free to register, to post a question or to start / join a discussion


Sending auto reply using PHP form


Likes # 0

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


$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
We have received your quotation request and shall be dealing with it shortly.\n
Thank you\n
The sales team\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
\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" );



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 = ()?

Like this post

Likes # 0

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.

Like this post

Likes # 0

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

Like this post
wholesale handbags

Likes # 0

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

Like this post

Likes # 0

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

Like this post

Reply to this topic

This thread has been locked.

IDG UK Sites

LG G4 launch live! LG G4 launch live blog - What to expect from the LG G4 launch, LG G4 launch...

IDG UK Sites

Apple Watch release day: Twitter reacts

IDG UK Sites

QuarkXPress 2015 released: the DTP tool gets a speed boost and long-document tools

IDG UK Sites

Apple Watch buying guide, price list & where to buy today: Which Apple Watch model, size, material,?......