Unix administration - Writing my own mass-email script in PHP

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > September 2004 > Writing my own mass-email script in PHP





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Writing my own mass-email script in PHP
Jeffrey Silverman

2004-09-27, 5:55 pm

Hi, all. Sorry, first off, for the kidna weird selection of crossposted
groups, but this question touches on aspects of discussion in each of the
groups.

So I have a group of around 500 email addresses to which I would like to
send a mass email occasionally. The group will never be much larger than
500 email addresses and will occasionally be about half that size.

I have written a simple HTML interface and php backend to process the
mail. HTML form wiht "subject" and "message body" fields. php then gets
all this, gets a list of addresses from a database, and sends the email
out.

What is a good way to proceed with this?

I would like to Bcc: the names on the list so that the "To:" is "Mail
List<maillist@mydomain.edu>" (which is a dummy email address).

I tried using the php mail() function and it *seemed* to work, almost.
That is to say, I had added all the names to a long list of Bcc: headers,
and put the extra Bcc: headers in the extra headers argument to the PHP
mail() function. This seemed to work, in that it seemed like everyone got
the email; however, the mail() function came back with a failure error.

I thought about it a bit and researched a little and found that maybe a
really long Bcc: list is not the best idea, for spam reasons (my
message is more likely to be marked as spam) and for other similar
reasons. So I was considering looping through the 500 email addresses and
doing a separate mail() for each, but putting each email address in the
To: field. This sounds like a lot of overhead, though, and I'm afraid of
this thing timing out or crapping out or Something Bad(TM) happening.

I am currently using Sendmail, Linux (Red Hat 9), Apache 1.3.x, and PHP
4.3.8.

I am not crazy about the idea of installing EZMLM only because I would
need to install Qmail and, although that may be a good idea in the long
run, it looks like a XXXXX (if the length of this page --
http://www.lifewithqmail.org/lwq.html -- is any indication!) I am not
really very experienced with MTA administration!

So, any suggestions? Any comments? Anything?

Thanks!!

--
Jeffrey D. Silverman | jeffreyPANTS@jhu.edu
Website | http://www.newtnotes.com

Drop "PANTS" to reply by email

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com