Hello,

On 01/02/2003 06:02 PM, Gilrain wrote:
I've just finished a PHP/MySQL mailing list. Basically, I'm having problems
with my sendmail function. It takes an array of e-mail addresses
($addresses) and loops through it, e-mailing each one using an SMTP class I
found (the only identifying comment in it is "SMTP Class By TOMO
(2001/09/14)"). The problem is, it's very slow. The typical array of
addresses sent to this is 100 to 500 elements large. The actual mailing list
has over 7000 members, but the e-mails are sent out to a geographical
region. Ideally, though, this function should be able to handle mailing to
the entire member base.

Here's the offending function (with private stuff altered). Currently, it
will only send to about 50 of the addresses before Internet Explorer times
out and cuts it off (perhaps five minutes or so). Note that this is without
catches, so it skips to the 'else'.

If I comment out the sending part, as shown, the operation takes a split
second and the log is written correctly, so I know the problem lies in the
sending of the mail. The only solution I can think of is to make the user
send things in chunks of 50 or so addresses, but I'd like to avoid this
inconvenience if I can. Any ideas?
Using SMTP to deliver messages is a bad idea unless you do not have an option, like you are under Windows. Under Unix/Linux it is better inject the messages in the local mailer queue and have it to do the bulk delivery.

In that case you may want to try this class that comes with sub-classes that let you configure details of delivery depending on your local mailer.

http://www.phpclasses.org/mimemessage


--

Regards,
Manuel Lemos


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

Reply via email to