Spreading load for large mailing lists (mail...) 
Author Message
 Spreading load for large mailing lists (mail...)

Hi,

I have a mailing list with about 900 users on it, now at the moment I just do a while loop on an sql
query and mail() each one.

I noticed that this spawns a sendmail process for each one on the server, which bogs it doen all at once.

Can anyone suggest a better way of doing this? I thought, maybe a form, so it progresses by a hundred and
refreshes onto another form with start=100,200,300 etc.

Can i fork stuff in php?

Poff
--

SDF Public Access UNIX System - http://www.*-*-*.com/



Thu, 18 Aug 2005 20:09:14 GMT  
 Spreading load for large mailing lists (mail...)
Quote:
> I have a mailing list with about 900 users on it, now at the moment I just

do a while loop on an sql
Quote:
> query and mail() each one.

> I noticed that this spawns a sendmail process for each one on the server,

which bogs it doen all at once.
Quote:

> Can anyone suggest a better way of doing this? I thought, maybe a form, so

it progresses by a hundred and

Quote:
> refreshes onto another form with start=100,200,300 etc.

imho you should use mailing list software like majordomo or something, but
anyway, you can set multiple recipients for each mail which will only
spawn one sendmail process for accepting the mail. if you don't want the
recipients to be visible, put them all in bcc.

bart



Fri, 19 Aug 2005 05:47:19 GMT  
 Spreading load for large mailing lists (mail...)
Hllo,


Quote:
> I have a mailing list with about 900 users on it, now at the moment I just do a while loop on an sql
> query and mail() each one.

> I noticed that this spawns a sendmail process for each one on the server, which bogs it doen all at once.

That is because you are using an inappropriate method of delivery with
sendmail. If you really need to use personalized messages, you would
better just leave the messages in sendmail queue and it will deliver
them next time the queue run, instead of making sendmail stall your PHP
script trying to deliver the message immediately.

In that case you may want to try this class that comes with a sub class
that lets you use sendmail directly setting the appropriate delivery mode:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos



Fri, 19 Aug 2005 11:54:20 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ANNOUNCE Take 2: python-win32 mailing list on mail.python.org

2. ANNOUNCE Take 2: python-win32 mailing list on mail.python.org

3. MS-Mail / Internet Mail / CC-Mail

4. Change e-mail / Cambio de e-mail / Changement d'e-mail

5. Changing E-Mail Subject Line in Mail/Fax Templates

6. Mail Templates - Attachment to e-mail

7. Returned mail: GoSite mail configuration error

8. send mail using SMTP Send Message when mail server is unknown

9. UNINETT Mail Network -- failed mail

10. Looking for Mail file parser for netscape mail

11. Difference between @mail() and mail() ??

12. Reading mail using my yahoo-mail account

 

 
Powered by phpBB® Forum Software