lilman Posted October 21, 2007 Share Posted October 21, 2007 I am sending emails using mail() function but I cannot get the reply to or from to work. Below is the code $headers = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]' . "\r\n" . mail($emailAddress, $subject, $mailcontent, $headers); Link to comment https://forums.phpfreaks.com/topic/74245-php-mail-header-from/ Share on other sites More sharing options...
lilman Posted October 21, 2007 Author Share Posted October 21, 2007 Also I should add that when I do send an email the from is this: Nobody <[email protected]> Link to comment https://forums.phpfreaks.com/topic/74245-php-mail-header-from/#findComment-375070 Share on other sites More sharing options...
chronister Posted October 21, 2007 Share Posted October 21, 2007 Here is a mail script I use that I have not had any priblem with. <?php $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $headers .= "X-Mailer: PHP/" .phpversion() ."\n"; $headers .= "From: $name <$email>"; $to='[email protected]'; $subject = 'WebForm Question From '. $name; $body=''; mail($address , $subject, $body, $headers); ?> Nate Link to comment https://forums.phpfreaks.com/topic/74245-php-mail-header-from/#findComment-375091 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.