Jump to content

Automated email


unplugged_web

Recommended Posts

Why not? Just have another email call with the address they supplied in the to parameter.

Link to comment
Share on other sites

No, you can put anything you want in the subject parameter.

mail($_POST['email'], "Thank you for contacting OurBusiness", "Blah", "From <thehappyappy@ourbusiness.com>\r\n");

Link to comment
Share on other sites

No, you can put anything you want in the subject parameter.
mail($_POST['email'], "Thank you for contacting OurBusiness", "Blah", "From <thehappyappy@ourbusiness.com>\r\n");

This is what I've got to send the information from the form:
<?php$message = "Name: {$_POST['name']}\nEmail: {$_POST['email']}\nTelephone: {$_POST['telephone']}\nCurrent Job Title: {$_POST['current_job_title']}\nAddress: {$_POST['address']}\nCity: {$_POST['city']}\nPostcode: {$_POST['postcode']}\nCountry: {$_POST['country']}\nYour Name: {$_POST['your_name']}\nYour Email: {$_POST['your_email']}\n-fuser@ourbusiness.com";ini_set("sendmail_from", 'thehappyappy@ourbusiness.com');mail("thehappyappy@ourbusiness.com","contact via refer a friend form","$message");?>

would I just add

mail($_POST['email'], "Thank you for contacting OurBusiness", "Blah", "From <thehappyappy@ourbusiness.com>\r\n");

to the end of it?Also is it possible to specify a header as well as subject?Thanks

Link to comment
Share on other sites

would I just add
mail($_POST['email'], "Thank you for contacting OurBusiness", "Blah", "From <thehappyappy@ourbusiness.com>\r\n");

to the end of it?

Yes, but as you set the from address in php.ini you don't need the from header. If you do want to add it I wrote it wrong it should be "From: thehappyappy <thehappyappy@ourbusiness.com>\r\n"
Also is it possible to specify a header as well as subject?
Yes, why not?
mail($_POST['email'], "Thank you for contacting OurBusiness", "Blah", "Header1:value\r\nheader2:value\r\n");

Link to comment
Share on other sites

Yes, but as you set the from address in php.ini you don't need the from header. If you do want to add it I wrote it wrong it should be "From: thehappyappy <thehappyappy@ourbusiness.com>\r\n"Yes, why not?
mail($_POST['email'], "Thank you for contacting OurBusiness", "Blah", "Header1:value\r\nheader2:value\r\n");

Thanks, where do I specify what the header1 and header2 are?
Link to comment
Share on other sites

Well, say you wanted to send content-type and reply-to headers, then you could do

mail($_POST['email'], "Thank you for contacting OurBusiness", "Blah", "content-type:text/html\r\nreply-to:help@ourbusiness.com\r\n");

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...