SMTP, mail() and piping directly into Sendmail, which is better?
| From: | Jonathan Chum | Date: | Thu, 23 Jan 2003 03:48:55 +0000 |
| Subject: | SMTP, mail() and piping directly into Sendmail, which is better? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-132733@lists.php.net to get a copy of this message | ||
I'm working on mass mailing list application and doing my research on the
part with the actual delivery of the message. I've been using a Perl script
called MojoMail which sends out blasts just fine and boasts that SMTP is the
fastest way for delivery than with Sendmail using a module called BulkMail.
I always understood that SMTP adds an additional layer around the MTA which
really slows things down, however only useful if you plan to blast emails
across several SMTP servers for a load balancing purposes.
So that's a 'pro' for using SMTP. The 'con' is that delivery is not quite
as
fast.
Then with PHP's mail(), folks have been saying that because it opens/closes
a connection, looping through mail() adds additional overhead and that the
best way would be to pipe into the MTA with popen()/pclose()
Now I'm curious which method is really better...Piping into the MTA will
still open/close the connection and adds the same amount of overhead as
mail() do right? What are your thoughts on SMTP?