Page 1 of 1
Mass mail techniques?
Posted: Wed Jan 19, 2005 8:21 am
by elmonty
I have a PHP/MySQL site already developed. The members of the site belong to an email discussion list. This list is currently being handled by a program called SmartList. However, we keep losing email messages and the web host is not being helpful in resolving the problem.
Because SmartList is poorly documented and supported, I've been considering writing my own email list handler in PHP. It would tie into the members database a lot more naturally than a 3rd party program.
My immediate question is this:
When sending a message to a couple of hundred people, is it better to loop through the list of email addresses and call mail() for each one? Or should I call mail() once for each dozen or so addresses and BCC all those addresses in a single message?
Posted: Wed Jan 19, 2005 8:23 am
by Weirdan
It would be a lot faster to send a message using multiple BCC.
Posted: Wed Jan 19, 2005 8:27 am
by elmonty
Thank you for the speedy reply.
Does it make any difference in determining the success or failure of sending the message any particular address?
One of the things I'll eventually have to do is bounce management <yuck>.
Posted: Wed Jan 19, 2005 8:48 am
by Weirdan
you may set Return-path to some custom alias, say
bounces@yourdomain.com and then hook up a script to this alias either via procmail or simple .forward file (or virtusertable.conf file if you're using Sendmail).
Posted: Wed Jan 19, 2005 9:50 am
by elmonty
I'm aware of using Return-Path, thanks. I'm just wondering if the return value and any error messages from the PHP mail() function will be any more or less useful when sending using multiple BCC.
Posted: Wed Jan 19, 2005 10:06 am
by elmonty
How do I make the messages appear to be addressed to the mailing list instead of each recipient? If I put the mailing list's name in the "To" header when I distribute it, won't that send the message to the list again, causing it to be resent ad infinitum? The only solution I can think of is to put a custom header in the message and don't distribute the message if that header exists. Is there a simpler way?
Posted: Wed Jan 19, 2005 10:14 am
by feyd
what about making the send-out address of the list not that address.. or using a different address (that's blackholed, for instance)
Posted: Wed Jan 19, 2005 10:20 am
by elmonty
If you send a message to, for instance,
somegroup@yahoogroups.com, each recipient will get a message addressed to "
somegroup@yahoogroups.com", not addressed to them individually. That's what I'm trying to figure out how to do.
Now when a message comes in to
somegroup@mywebsite.com, I need to handle that message and distribute it to all the members, but with each copy of the message addressed to "
somegroup@mywebsite.com".
Posted: Wed Jan 19, 2005 10:25 am
by feyd
could probably just not send anything that has a From of the same address.
Posted: Wed Jan 19, 2005 11:50 am
by elmonty
Nope, that doesn't work either. The From address will be the original sender.