Hi. I have myself written a rather clumsy mass mailer in php which queues mail via the sendmail-command. I have found this to be rather slow and ineffective.
You are talking about queueing mail directly to the mailqueue, and I wonder, how is that done with php? About making mails not rejected by spam-filters I have experienced that there should be something in the to field, many servers are rejecting mails that it empty in that header. Also, if you are sending out html letters, try and attach a plain text version as well, or emails will be rejected as well. I have a rather neat script for the latter if anybody is interested. But please get back with some tips how to queue mail straight to the mail queue for fast delievery. /peter a At 2002-12-22 20:52, Manuel Lemos wrote: >Hello, > >On 12/22/2002 02:52 PM, Jonathan Chum wrote: >>>>I was considering of writing the mass mailing application in PHP instead >>>>though. >>>> >>>>If anyone has eperience writing such applications with this amount of >>>>emails, I'd like to know what you've done. >>> >>>If you do not need to send personalized messages (messages that differ >>>for each recipient), just put all recipients in a BCc: header and send a >>>single message to the local mailer queue (not via SMTP). >>> >>>If you do not care for the users that bounce messages, just make the >>>return path be black hole email address. OTOH, if you care about bounces >>>(you should if you mailing list is large or is not clean), consider >>>using ezmlm, which is a mailing list manager than among other things >>>takes care of bounce messages thanks to qmail VERP. I was told that is >>>the one that eGroups hacked to use in the now known YahooGroups site. >>> >>>Once I built a small Web interface for ezmlm. It was meant just to >>>create and edit several mailing lists meant to be used as newsletter for >>>a portal with many sites. Is simple but it already comes with a SOAP >>>interface to manage the mailing list subscribers remotely. >>> >>>http://www.phpclasses.org/ezmlmmanager >> >>I heard that using BCC, it can only handle a certain amount of receipients. > >No, if you look in the archives of this list you will notice that this was explained >several times. What happens is that some ISP of shared hosting limit the number of >recipients of the messages you can send because they do not want you to do mass >mailing at all. You should check your ISP Acceptable Use Policy before trying to do >any mass mailing. Trying to queue individual messages to each recipient may fool the >server limitations but you may still be against the AUP. > > >>Also, messages that are BCC'd are also tend to be blocked by mail servers >>and clients. > >Any server owners that do that are dumb because while they think they are blocking >spammers, what they get is they are simply blocking opt-in mailing lists for instance >like this one you are getting. At the same time you still keep getting most of the >spam because real spammers use dedicated machines make the recipients addresses show >in the messages as needed to defeat that silly anti-spam criteria. So, what they get >is to block solicited e-mail. > >Anyway, the problem of personalizing messages is that makes your mailings take much >longer to generate and queue because you need to create separate message for each >recipient. > > >>>No, queuing via SMTP is the slowest way to send messages. Your script >>>should not bother to deliver the messages to the recipients SMTP >>>servers. Delivery can take hours or days to finish due to network >>>congestions and hard to conect SMTP servers. Just queue the messages in >>>the local mailer and let it take care the actual delivery. >>> >>>I would recommend a qmail based system anytime, with or without ezmlm on >>>top. In a production system that I manage, it just takes 3 seconds to >>>queue a alert message to be sent to 50,000 via a local qmail server. >>> >>>You can also use sendmail almost as fast using the queue only mode. Some >>>people think that sendmail is slow and many forks processes because they >>>are not aware of how to configure it to queue the messages the fastest >>>way that is possible. >>> >>>You may want to look into this class that has a sub-classes for >>>delivering with sendmail program directly instead of using the mail(). >>>It lets you configure the sendmail delivery mode. There is also a >>>sub-class for delivering with qmail. >>> >>>http://www.phpclasses.org/mimemessage >> >>I was looking at a variety of methods, and seems that everyone thinks for >>best performance, you would inject the email in to Qmail or Sendmail's queue > >That is because it is really the best. > > >>and run it every hour. > >With qmail you do not have to run the queue like sendmail. You just inject the >messages and it will deliver them when possible. > > > > >>As for SMTP, I meant sending the email through your outbound SMTP server >>which in our case, a server we build specifically for handling that sort of > >Of course all e-mail is delivered to each recipient via SMTP, but that you can relay >to your local mailer. > > >>volume. I was reading through Perl's BulkMail module, >>http://mojo.skazat.com/support/documentation/Bulkmail.pm.html >>They are using SMTP to delivery their emails. Using envelopes and sorting >>the emails by their host meant even faster delivery. Though the envelope > >That would be a good idea if you have messages to be sent to many recipients of the >same domain but in reality it is more problematic. Some servers indeed reject >messages to be sent many recipients at once. Although that is not illegal, it is a >pattern of spamming. Another problem, is that you will have an hard time >distinguishing which addresses of a same domain are bouncing and which are not >bouncing. > > >>method seems to be like BCC as you can't personalized each email To: >>recepient. > >If you want delivery efficiency, forget personalization. > > >>Your Mime Message class seems to be better for sending mass mailings as it >>queues up the email into Sendmail without opening/closing the connection for > >Actually the class provides different delivery methods that maybe appropriate in >different circunstances: mail(), sendmail, qmail and SMTP. > >SMTP is the slowest for queuing but it is the fastest for direct delivery. My SMTP >class supports direct deliveries which is great to deliver urgent messages as they >are not relayed to the local mailer. It delivers to the recipient SMTP server and you >will know if the message was accepted right away. I use this to deliver password >reminder and other messages that users of my sites are anxious to receive because the >local mailer queue may be loaded at the moment with some long delivery. > > >>each recepient. phpmailer.sourceforget.net has that problem of opening and >>closing a connection, yet they claim to receive good results of up to 40,000 >>emails per hour. Another software using that class was able to send 500,000 >>emails in 10 hours. > >You should not consider any delivery statistics because all depends on factors that >have nothing to do with the software you use, like the outbound bandwidth, remote >server reachability, anti-spam reception delays, temporary messages refusals (mailbox >full, blocked account, etc..). > > >>If injecting the emails directly into Qmail (Sounds to me that Qmail is far >>better for email deliver than to be using Sendmail) vs using SMTP, then > >DJB software rules! BTW, consider using DJBDNS cache to reduce DNS server lookup time. > > >>that'll be the approach. The only reason I'd would be using SMTP is to keep >>the code and data (on MySQL) stored on one machine and when it's time to >>blast out an email, it'll establish a connection to a SMTP server assigned >>to the list to deliver the email. > >In that case, you may consider QMQP relay which is a protocol that lets you rely >entire mail queues from a server to another. This is recommended when you have many >busy mailing lists served from one machine and you can use more servers do the actual >delivery. I think only qmail and ezmlm support QMQP. > > >>Though if the code was written to sit on each server that scans for pending >>tasks, it'll pick up it's job from a master database server and then >>directly injecting Qmail locally. > >That is what qmail does. > > >>The software app I'm writing is expected to have many users with small to >>very large lists. I'm trying to spec this out so that it scales well and >>with the fastest delivery. From what I'm hearing from you and from the first >>guy's reply to this thread, inject the email into Qmail is the quickest way. > >Yes, qmail was thought for that. Yahoogroups use it and I have also used when I >worked in a large portal with many subscriber newsletters as I mentioned. We had some >very large like for MTV Brasil that had almost 400,000 subscribers. > >The greatest problem that made me learn some hard lessons is that it is very >problematic if you start with subscribers list that are not clean up of no longer >valid users. Once you start delivering messages to those addresses, you get a flood >of bounces that pratically stop your server queue. > >The MTV newsletter was weekly, but that affected the newsletters of other sites that >were stopped during the MTV newsletter bounces. Since ezmlm does not unsubscribe >bouncing addresses right away, the solution was to remove bouncing subscribers using >an external validation procedure. I used this other class for the cleanup. After that >it was a breeze. We had peaks of 10,000 messages sent per minute. > >http://www.phpclasses.org/emailvalidation > > >-- > >Regards, >Manuel Lemos > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php