Re: X-Mailer and headers when sending mail

From: Date: Thu, 09 Mar 2006 17:23:47 +0000
Subject: Re: X-Mailer and headers when sending mail
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-231726@lists.php.net to get a copy of this message
On Thu, 2006-03-09 at 17:27 -0800, Angelo Zanetti wrote: > When adding additional headers to an email that gets sent from the mail function. What purpose > does the X-Mailer have? > It identifies the mail client. So I normally set X-Mailer = "MySite Mailer"; or something. This directive won't normally cause problems with servers, but the Reply-To header will. Some servers reject mail without a valid return address, mainly because this is a spam trick. Its a reverse lookup of sorts on the mail server side. > Also are the following linked: > > -X-Priority > -Importance > -X-MSMail-Priority Yes, MSMail-Priority is for Microsoft clients, Importance is for Mac clients (I think) and X-Priority is for the rest of the known universe that adheres to standards. > > Another question is can I omit the Message-ID for the email? or will this result in some mail > servers viewing the mail > as spam? What criteria do I use to generate the Message-ID? > Message-ID is OK to omit In my experience, but see above for Reply-To > I've seen: > $headers .= "Message-ID: > <".date("YmdHis")."you@".$_SERVER['SERVER_NAME'].">\n"; > > is this ok? I would do a date("r") for a nice RFC format date and time, but it should be OK. > > Perhaps if someone has a link on the headers for a mail that could help me it would be much > appreciated. > http://za2.php.net/ mail function. --Paul

« previous php.general (#231726) next »