Re: sending mail from localhost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/13/07, Richard Lynch <ceo@xxxxxxxxx> wrote:
On Wed, June 13, 2007 8:51 am, Daniel Brown wrote:
> $from = "webmaster@xxxxxxxxxxx";
> //$reply_to = "webmaster@xxxxxxxxxxx"; // Same address, so not needed.

Some spam filters and some email clients will behave rather badly if
you don't have Reply-to: as well.

Use it.

> $headers .= "X-Mailer: PHP".phpversion()."\r\n"; // Headers ALWAYS
> need \r\n

The last header does not NEED \r\n because PHP is going to trim that
off and put \r\n\r\n between headers and body anyway.

But it's good practice to put it in there so that when you add yet
another header, you don't mistakenly leave it out where it is needed.

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?



   Is that a fact, Richard?  It was always my understanding that the
raw connection to the SMTP server initiated by the PHP mail()
functions and Sendmail required the \r\n separator for every field
other than SUBJECT (included in the DATA part of the message body).

   And it's my opinion, of course, but any SPAM filter that would
require a reply-to header is done in bad form.  It should certainly
require X-Mailer, but what good is a spoof-able reply-to header if the
from header is already in place, real or unreal?

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux