Re: [PHP] PHP Send Mail Main headers.
On Friday 28 March 2003 03:24, Don Read wrote: We're getting way off-topic here. > Not entirely accurate. It has to do with how you connect to the MTA. > > RFC822 only applies to SMTP 'on the wire' and internal delivery formats are > outside the scope. > > There are alot of UUCP class 1 sites out there, and X.400, and JNT, and ... > None of which follows RFC822 unless they gateway to SMTP. AFAIK PHP's mail() command doesn't do any of the above except 'internet mail' (SMTP). > Since MS-Windows doesn't have a native command-line mailer --PHP has to > handle the connection to the gateway host and thus falls under 822. > > The 'must have ' rule is the lowest common denominator needed to > support a mis-functional (albeit very popular) platform: MS-Windows. Hmm, RFC 822 was conceived some time in the early 1980's. Which genius anticipated the 'popularity' of Windows back then? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Youth is a blunder, manhood a struggle, old age a regret. -- Benjamin Disraeli, "Coningsby" */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Send Mail Main headers.
On 27-Mar-2003 Jason Wong wrote: > On Wednesday 26 March 2003 23:01, -{ Rene Brehmer }- wrote: > >> > is not an overkill. That is the specs. Some MTAs (sendmail in >> >particular) will treat a single LF (\n) as a line termination as thus >> >you >> > can get away with it. >> >> On unix machines you can do with just a linefeed, on CPM/DOS-based >> systems >> (that is, DOS & Windows), you need CRLF... > > This has nothing to do with the OS. It is to do with the specs (RFC-822). > Not entirely accurate. It has to do with how you connect to the MTA. RFC822 only applies to SMTP 'on the wire' and internal delivery formats are outside the scope. There are alot of UUCP class 1 sites out there, and X.400, and JNT, and ... None of which follows RFC822 unless they gateway to SMTP. Since MS-Windows doesn't have a native command-line mailer --PHP has to handle the connection to the gateway host and thus falls under 822. The 'must have ' rule is the lowest common denominator needed to support a mis-functional (albeit very popular) platform: MS-Windows. > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Send Mail Main headers.
On Wednesday 26 March 2003 23:01, -{ Rene Brehmer }- wrote: > > is not an overkill. That is the specs. Some MTAs (sendmail in > >particular) will treat a single LF (\n) as a line termination as thus you > > can get away with it. > > On unix machines you can do with just a linefeed, on CPM/DOS-based systems > (that is, DOS & Windows), you need CRLF... This has nothing to do with the OS. It is to do with the specs (RFC-822). -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* All of life is a blur of Republicans and meat! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Send Mail Main headers.
On Mon, 24 Mar 2003 18:51:47 +0800, Jason Wong wrote about "Re: [PHP] PHP Send Mail Main headers." what the universal translator turned into this: >On Monday 24 March 2003 18:35, Don Read wrote: >> On 24-Mar-2003 Philip J. Newman wrote: >> > $headers .= "MIME-Version: 1.0\r\n"; >> > $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; >> > $headers .= "From: ".$from_name." <".$from_address.">\r\n"; >> > $headers .= "Reply-To: ".$from_name." <".$from_address.">\r\n"; >> > $headers .= "X-Priority: 3\r\n"; >> > $headers .= "X-MSMail-Priority: Normal\r\n"; >> > $headers .= "X-Mailer: iCEx Networks HTML-Mailer v1.0"; >> > >> > Is this about all i need to send a mail in PHP excluding the mail(); >> >> More than enough. >> Couple of thoughts ... >> >> Drop the X-Priority and X-MSMail-Priority. Those are the default values >> and thus un-necessary. >> Also the is over kill; a simple \n will do just fine. > > is not an overkill. That is the specs. Some MTAs (sendmail in >particular) will treat a single LF (\n) as a line termination as thus you can >get away with it. On unix machines you can do with just a linefeed, on CPM/DOS-based systems (that is, DOS & Windows), you need CRLF... Also, for compliance sakes ... you miss the date field ... and depending on receiving server's setup, also a subject ... some servers require from, to, subject, and date to be set as minimum ... Alot of mailservers I've had to transfer through refuses to accept mail without the TO field. Rene -- Rene Brehmer This message was written on 100% recycled spam. Come see! My brand new site is now online! http://www.metalbunny.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Send Mail Main headers.
On Monday 24 March 2003 18:35, Don Read wrote: > On 24-Mar-2003 Philip J. Newman wrote: > > $headers .= "MIME-Version: 1.0\r\n"; > > $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; > > $headers .= "From: ".$from_name." <".$from_address.">\r\n"; > > $headers .= "Reply-To: ".$from_name." <".$from_address.">\r\n"; > > $headers .= "X-Priority: 3\r\n"; > > $headers .= "X-MSMail-Priority: Normal\r\n"; > > $headers .= "X-Mailer: iCEx Networks HTML-Mailer v1.0"; > > > > Is this about all i need to send a mail in PHP excluding the mail(); > > More than enough. > Couple of thoughts ... > > Drop the X-Priority and X-MSMail-Priority. Those are the default values > and thus un-necessary. > Also the is over kill; a simple \n will do just fine. is not an overkill. That is the specs. Some MTAs (sendmail in particular) will treat a single LF (\n) as a line termination as thus you can get away with it. Stay with the spec and use (\r\n). -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Don't say "yes" until I finish talking. -- Darryl F. Zanuck */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Send Mail Main headers.
On 24-Mar-2003 Philip J. Newman wrote: > $headers .= "MIME-Version: 1.0\r\n"; > $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; > $headers .= "From: ".$from_name." <".$from_address.">\r\n"; > $headers .= "Reply-To: ".$from_name." <".$from_address.">\r\n"; > $headers .= "X-Priority: 3\r\n"; > $headers .= "X-MSMail-Priority: Normal\r\n"; > $headers .= "X-Mailer: iCEx Networks HTML-Mailer v1.0"; > > Is this about all i need to send a mail in PHP excluding the mail(); > > More than enough. Couple of thoughts ... Drop the X-Priority and X-MSMail-Priority. Those are the default values and thus un-necessary. Also the is over kill; a simple \n will do just fine. The way I usually do it: $adminemail='Foobaz Administration <[EMAIL PROTECTED]>'; $theprgmr='<[EMAIL PROTECTED]>'; $headers =array( 'List-Id' => SITENAME, 'Cc' => "$adminemail, <[EMAIL PROTECTED]>", 'Sender' => "$adminemail", 'Reply-To' => "$adminemail", 'Bcc' => "$theprgmr", 'From' => "$adminemail" ); $mailhdrs=''; foreach($headers as $k => $v) { $mailhdrs .=sprintf("%s: %s\n", $k, $v); } mail($mailto, $mailsubj, $mailmsg, $mailhdrs); > > -- > Philip J. Newman. > Head Developer > [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php Oh, and I hope you're going to consider a multipart/alternative message body. HTML-only e-mail is evil. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php