Writing my own mass-email script in PHP

From: Jeffrey Silverman (jeffrey_at_pantsjhu.edu)
Date: 09/27/04


Date: Mon, 27 Sep 2004 12:22:48 -0400

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 bitch (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


Relevant Pages

  • Writing my own mass-email script in PHP
    ... I have written a simple HTML interface and PHP backend to process the ... That is to say, I had added all the names to a long list of Bcc: headers, ... I am not crazy about the idea of installing EZMLM only because I would ...
    (alt.os.linux)
  • Writing my own mass-email script in PHP
    ... I have written a simple HTML interface and PHP backend to process the ... That is to say, I had added all the names to a long list of Bcc: headers, ... I am not crazy about the idea of installing EZMLM only because I would ...
    (comp.lang.php)
  • Re: Writing my own mass-email script in PHP
    ... > and put the extra Bcc: headers in the extra headers argument to the PHP ... Putting all recipients in Bcc: is not a good idea because ...
    (comp.lang.php)
  • [FAQ] FAQ Thread (Rev 1)
    ... fix it and then post it. ... Then, if you are coding in PHP 5, pass the context to ... Referer headers, for example, while others can be configured ... store the session id in the ...
    (comp.lang.php)
  • [FAQ] FAQ Thread (Rev 3)
    ... fix it and then post it. ... Then, if you are coding in PHP 5, pass the context to ... Referer headers, for example, while others can be configured ... store the session id in the ...
    (comp.lang.php)