Re: socket connection

From: Date: Wed, 19 Jul 2000 11:00:04 +0000
Subject: Re: socket connection
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7344@lists.php.net to get a copy of this message
Hi On 19-Jul-00 00:33:45, Mukul Sabharwal (mukulsabharwal@yahoo.com) wrote: > Any idea how after connecting to a SMTP server... what > should be sent to the SMTP server to send a mail.. i > mean the headers. If you're sure you want to do it directly and not via mail() or whatever, have a read of rfc821, but basically you need: HELO <hostname> MAIL FROM: <email@address> RCPT TO: <email@address> (repeated as many times as needed) DATA Headers (Subject, From and To are the least you should be sending), mail content, then: . QUIT Of course, every instruction should be CRLF delimited, and you should take care not to let a blank line and CRLF get through in the DATA segment. Regards Tom -- Thomas 'Freaky' Hurst - On ARCNet - http://arcnet.vapor.com/ Team Member of AmiBench - http://www.amibench.org/ Full time ARexx, PHP, Linux and Amiga freak, student and bum -- X-Windows: ...Complex nonsolutions to simple nonproblems.

« previous php.general (#7344) next »