dazzclub Posted July 31, 2008 Share Posted July 31, 2008 I've been doing php email scripts on and of, but not paying that much attention. So now i going back and writing (attempting to) the email.php script, making it cleaner and trying to make it a better experience for the email applications to understand. I have set up my email like this so far; -------------------------- $sendTo = " myemail"; $subject = "test"; //set up headers $headers = "From: $EmailFrom \n"; $headers .= "$forename $surname \n"; $headers .= "Reply-To:myeail \r\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; $message =" testing" mail($sendTo, $subject, $message, $headers); -------------------------- Now when i test this form, some of the headers i set up are included in the body, like this darren azzopardi Reply-To: my email MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1 test Have i used the wrong headers??? regards Darren Link to comment https://forums.phpfreaks.com/topic/117510-including-the-right-headers-in-an-email-script/ Share on other sites More sharing options...
samshel Posted July 31, 2008 Share Posted July 31, 2008 try this.. <?php $sendTo = "[email protected]"; $subject = "test"; //set up headers $headers = "From: Name LastName<[email protected]> \r\n"; $headers .= "Reply-To:[email protected] \r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $message =" testing"; mail($sendTo, $subject, $message, $headers); ?> Link to comment https://forums.phpfreaks.com/topic/117510-including-the-right-headers-in-an-email-script/#findComment-604447 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.