Hello,

On 04/29/2004 06:44 AM, Chris O'Shea wrote:
I have a list of email addresses in mySQL from people who have signed up on
my site and I want to use PHP to email out to the list.

My initial thought was to go through the loop, sending an email to each
person, but then I saw this somewhere:

"It is worth noting that the mail() function is not suitable for larger
volumes of email in a loop.

This function opens and closes an SMTP socket for each email... not very
efficient."

This is a myth. SMTP connections for queueing only happen with mail() under Windows. Under Unix/Linux you can always configure your local mailer, eventually in php.ini to just queue the message for later delivery. This is what is recommended for mass mailing with PHP mail function, unless your local mailer is qmail. In that case you do not need to configure anything because qmail never attempts to deliver message immediately.



Does anybody know the best way of doing a mass mail through php?

mail() function is just fine in most cases.



Also, do you know how php mail() handles bounced emails? Ideally I'd like to
either receive them or use a script to record then.

It depends on your environment. For an OS independent solution, you may want to try this class that lets you specify the bounce address using the Return-Path header. Keep in mind that just specifying the Return-Path address to the mail() function does not do anything. This class just does some magic to figure how to set the bounce address depending on your environment.


http://www.phpclasses.org/mimemessage


--


Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to