Jump to content

Mail() Function


chibineku

Recommended Posts

I have a very basic contact form, the action of which is to a script that sanitizes the input and sends me an e-mail. This is the code I have for the mail() function:

$headers = 'To: Jonathon <chibineku@aol.com>'. "\n\n";$headers .= 'From: '.stripslashes($tr_email).''."\n\n";$to = "chibineku@aol.com";$subject = "AromaClear E-Mail from: ".stripslashes($tr_email)."";$msg .="Subject: ".stripslashes($tr_subject)."\n\n";$msg .= "Message: ".stripslashes($tr_body)."\n\n";mail($to, $subject, $msg, $headers);

When the e-mail is sent, the FROM address is the auto mailer of my server. Is there any way to change that so it says what I want it to say, which is Jonathon <chibineku@aol.com> ? or do I need to change config/ini files for that?An aside: if I want to send HTML mail, I am aware of the headers I need to set, but do I still need to use the appropriate doctype and content-type tags, and is there any point setting a <title> ?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...