Re: [PHP] Sending e-mail via socket

[email protected] (Per Jessen)
Newsgroups php.general
Organization Per Jessens personal news-server
Message-ID <[email protected]>
Paul M Foster wrote:

> Second, you're doing this socket operation as though it's a static
> one-sided conversation. I'm not an expert, but SMTP conversations
> don't normally work this way. You issue the HELO, wait for the
> response, issue other commands, wait for the response, etc. The way
> you're doing it, if your SMTP conversation runs into any snags (like
> the RCPT TO is not recognized), you won't know it. Your function will
> simply ride over the error, because it's not listening to the SMTP
> server.

Even if the mailserver does pipelining, he'll still need to do the EHLO
separately and wait for the response to see if it does.  After that you
can fire off everything in one go.

/Per

-- 
Per Jessen, Zürich (7.8°C)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.