Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: sending bulk mails


Message #1 by harini@v... on Thu, 18 Apr 2002 12:00:40
Well, based on my experience of running this (and several hundred other l
ists)
on the P2P server, I'd recommend a specialised bulk mail sending program 
for
this job. The problem with sendmail and other mail systems that are desig
ned
essentially for single users, is that they are simply not capable of send
ing
huge amounts of mail simultaneously. Sendmail famously forks when sending
 to
multiple addresses, so that if you try to send 10,000 mails simultaneousl
y
with it, you get 10,000 sendmail processes running at once!

There are other concerns:
When should it stop trying to send mail to recipients with transient prob
lems?
What policy should it adopt towards bad mail addresses, that bounce (the
number of these will increase naturally, with time, if you don't take act
ion
to remove them yourself, or build some method of doing so into your syste
m)?
How will it manage those addresses that have recieved the mail correctly,
 and
those which still need another go?
If 10% of your members are Yahoo subscribers, what happens to your carefu
lly
crafted sending facility if the whole Yahoo network develops transient
problems (as happened about a year and a half ago, when listservers the w
orld
over began to get tied up in endless loops, as the queue of mail coming i
n
began to exceed the amount going out)?

Note that last point: even purpose-built software like we use can suffer
severly when Yahoo or similar large vendors develop belly aches. Its for
these kinds of disasters that bulk mail software is written.

What software to use is largely a matter of choice and budget. P2P uses L
yris
List Manager software on a simple Dell base unit running Postgres as its
backend DBM on Bedian. To compare with a task similar to what we're
discussing here, the same machine is used to send the P2P updates, that y
ou
will get from us every so often (I hope a legitimate use of bulk mail in
everyone's assesment :). The update has about thirty six thousand unique
email addresses to send to, but the P2P machine can manage that in about
twenty minutes.

For the quantities of mail you're talking about, Lyris (the free version,
 at
least) will no suffice: Lyris start charging license fees for versions th
at
will send to lists of more than a few hundred members. Of course, you cou
ld
split your membership into dozens of small, bit-sized lists and set each 
to
be sent to at secheduled times around the clock using Lyris's internal
scheduling features, but Lyris is a bit of a sledgehammer solution for wh
at
you're asking. Majordomo is probably a better choice, because (although m
any
revile it) there is a huge user-base, and a wealth of experience out ther
e on
the web about how to get it doing what you want it to. It also comes bund
led
free with most 'Linux' distributions, so if you're a SuSE or Red Hat user
,
you'll probably find it's already installed on your machine. Majorodom do
es
have a maximum message size (about 100K, I think) so if you're into sendi
ng
vastly complicated HTML mails to people then: a) you probably deserve
anything that's coming to you, and b) you'll need to hunt around on Googl
e to
find the various hacks to circumvent this.

Dan



On Friday 19 April 2002 21:52, you wrote:
> I have done this (for legitimate purposes on a musician fan mailing lis
t)
> by creating a text file on the server containg the list, then pointing 
to
> that with a sendmail alias.
>
> PHP could be used to generate the text file.
>
> (my urge to be helpful overcomes my anti-spammer sentimate)
>
> Regards,
>
> Roger
>
> >Ah, welll that is because the script is taking longer than you tell it
> > that it can in your php.ini file.
> >
> >There is a max execution time setting in there.  It is to prevent your
> >webserver from getting killed if caught in a endless loop. among other
> >things.
> >
> >You can up the execution tiem if you want, but too high is not advisab
le.
> >
> >You would think though it should eb relatively easy to write that prog
ram
> > in Java or C is if all you are doing is sending emails.
> >
> >OR
> >
> >I woudl assume if you run PHP as an executable, you don't have the max
> >execution time problems.  Never used PHP for that, so not sure.
> >
> >
> >----- Original Message -----
>
> From: <harini@v...>
>
> >To: "professional php" <pro_php@p...>
> >Sent: Friday, April 19, 2002 6:04 AM
> >Subject: [pro_php] RE: sending bulk mails
> >
> >> I agree
> >> the options you have mentioned is fine but then these ...options hav
e
> >> been already been tried its...fine  for sending lesser list like max
 of
> >> 50 to 100 mail list after that it... gives fatal error max time
> >> execution failed...
> >>
> >> Hence I need a solution other than usual way to send mails....
> >> Using mail function is fine but the the way it should happen for bul
k
> >> mails is what the query is all about
> >>
> >> Harini
> >>
> >> > Either by using a loop or separate the recipients by ; in the same
> >> > email
> >>
> >> $number=3D0;
> >> $number_of_emails=3D1000;
> >> while($number<$number_of_emails) {
> >> mail($mail_to, $mail_subject, $mail_body, "from: ".$mail_from); }
> >>
> >> if that don't make sense then sorry
> >> -james
> >>
> >> -----Original Message-----
> >> From: harini@v... [mailto:harini@v...
m]
> >> Sent: 18 April 2002 12:01
> >> To: professional php
> >> Subject: [pro_php] sending bulk mails
> >>
> >> Hello,
> >>
> >> I would like to know is there a way to send bulk mails
> >> (ex. 5000 =3D10000)
> >>
> >> Programmatically or by a back end process in php
> >>
> >> Thanks in advance for help
> >> Harini



  Return to Index