Re: Re: mail function

From: Date: Fri, 03 Oct 2014 19:28:46 +0000
Subject: Re: Re: mail function
Groups: php.general 
Request: Send a blank email to php-general+get-323906@lists.php.net to get a copy of this message
On 2014-10-03 11:54, Richard wrote:
I believe the issue is that you are including the "$from" in the "additional_headers" parameter position without building a header or otherwise labeling that address. $subject_line = "testing email"; $to = "php@paz.bz"; $from = "webmaster@paz.bz"; $envelope_sender = "-f=<$from>"; $hit_date = date("Y-m-d H:i:s"); ... $message_body = "$subject_line ... mail($to,$subject_line,$message_body,$from,$envelope_sender); I think that if you label it, e.g., 'From: $from', or build a header variable and include it there, you'll be ok. See:
BINGO ! as simple as making my $from include the From: webmaster ... I am very grateful.
<http://php.net/manual/en/function.mail.php> for lots of detail. By the way, using the same "from" address everywhere makes figuring out where this is coming from more complicated. For testing purposes, try using different values in your various "from" instances so that things are more obvious.
excellent suggestion ... at least for troubleshooting. thank you muchly
    - Richard
-- Jim Pazarena 250.559.7777 www.haidagwaii.net/paz/

« previous php.general (#323906) next »