[prog] Mailing list software - how does the emailing work?
(mass bcc?)
Dan
dan at cellectivity.com
Tue May 10 18:37:08 EST 2005
> However I have read "Web-based PHP scripts aren't designed to run for
> long periods of time (the default execution time is 30 seconds), and
> this presents a problem if you need to send a weekly newsletter to a
> large number of recipients."
Another possibility is to use PHP to run a separate program that sends
the mail. PHP must not wait for the program to finish (i.e., you should
run the program in the background). You can have the program write to
some file to indicate that it has finished, and this file can be checked
on a separate PHP page.
The mail program could be a shell script that uses the "mail" command. A
better possibility might be a Python script, like this one:
http://docs.python.org/lib/SMTP-example.html
> I'm assuming that its more efficient to use htmlMimeMail and use BCC
> to send to several people at once rather than sending to each person
> one at a time using php's mail function? (is this correct?)
Yes, that is correct. The "mail" program includes an option to BCC
people. If you use the Python example, it's no longer called BCC, but
notice that the sendmail() function allows you to specify recipients
independent of the To: header. (PHP's mail() function does that as well;
it's a part of the SMTP protocol.)
Note that your SMTP server might place a limit on the number of people
you can BCC in one go. No problem: BCC the mail to a hundred people at a
time. For greater efficiency, sort the addresses by domain name: so if
you have five addresses @example.com, the SMTP server only has to
contact example.com once.
--
The only thing 'express' about Outlook Express is how fast it
spreads viruses. I like to call it LOOKOUT EXPRESS.
- Jim Greenly, professor at Georgia Institute of Technology
More information about the Programming
mailing list