You are here: Re: best ways for mass mailing « PHP Programming Language « IT news, forums, messages
Re: best ways for mass mailing

Posted by Manuel Lemos on 02/17/06 16:47

Hello,

on 02/17/2006 08:47 AM johnny said the following:
> I would like to understand which are the best ways to send bulk
> mailings like for newsletters and so on ( not spamming, always to
> receivers who opt-in ).
>
> I am not looking for code for now , I have found some very interesting
> classes and I also have my own scripts, I just want to know all the
> options available and why one is better of another .
>
> So, if have to send just a few copies to, say, less than one hundred
> people I can use the mail function, If I have to send , say, 20
> thousand emails I will have to hire dedicated mail servers, but what if
> I have to deliver a few hundreds emails ?
> What is usually the max limit using my shared hosting before moving to
> a dedicated mail server ?
>
> What is the best way ? maybe splitting the delivery in batches using
> the default mail ( sendmail ) or by SMTP ?

Mailing has two phases: queueing and delivering. Applications do not
deliver, they only queue in a MTA (Mail Transfer Agent) that takes care
of the delivery soon or later.

Queueing can be very fast if you inject the messages directly in the
MTA queue and tell it to deliver it later on the next queue run. This
way your queueing script takes much less time to queue all messages.

NEVER use SMTP for queueing, unless you have no option. That is the
slowest way to queue messages, despite there some people believe
otherwise. Queueing via SMTP is just another way to inject messages in
the MTA queue. The problem is that you need to establish a TCP
connection to the same machine. That is a silly solution when you can
call the sendmail program directly to do the same thing without TCP
connections overhead. SMTP should only be used when you have no way to
communicate with the MTA, like for instance when the MTA is in another
machine, or there is no sendmail installed in the local machine.

In sum, always use sendmail (or equivalent) to queue your messages. Some
sendmail implementations (or emulations) provide options to tell it to
defer deliveries. If possible use that option.

You may also want to take a look at this class that can compose and send
messages using several different queuing alternatives implemented by
sub-classes. There is one sub-class specialized in sendmail that
provides control over those sendmail option. Just call the SetBulkMail
function, and it attempts to optimize message queueing for mass mailing.

The class documentation has more mass mailing tips, like avoiding
personalization to take advantage of message body caching speedup.

http://www.phpclasses.org/mimemessage

As for the deliverying phase, there is not much you can do because it is
something under the control of the MTA. What I can tell you is that the
outgoing bandwidth plays a decisive role in the final delivery time. If
you have more outgoing bandwidth, you can deliver messages faster and
eventually more messages at the same time.

Beware that some hosting companies say they offer unlimited bandwidth
but in fact they have impose cap values to limit the outgoing transfer
rates per hosting client. That is important to not let one client suck
all the outgoing bandwidth.

--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация