Forum Moderators: coopster

Message Too Old, No Replies

PHP Mailers

What is the best way to send out a mailer?

         

Sekka

1:26 pm on Dec 11, 2006 (gmt 0)

10+ Year Member



Hi,

For a long time we have provided newsletter functionality to our clients but we have used the same system for over a year now, and it is one I built when I wasn't very experienced with PHP.

I want to know the best way to send out an email mailer. At the moment, we send out the email to each email address seperately on a recursive loop.

The PHP file will send out about 40 emails then reload itself, do the next 40, and so forth.

I am almost postive there is a better way of sending out the mailer, and I am hoping someone on here could help me.

I have no problem with the HTML or junk mail filters, it is just the methid we use to send the email, as a ~500 person mailing list is talking about 30 minutes to send.

Thank you.

barns101

2:33 pm on Dec 11, 2006 (gmt 0)

10+ Year Member



a ~500 person mailing list is talking about 30 minutes to send

Is that how long the script takes to execute or how long it takes sendmail to finish sending? I have a list of about 1,500 email addresses and it takes a minute or two at most to send them all (and that's on a shared host). All I do is use a while loop to select the name and email address from a database and use mail() for each record. (Yeah I know this is probably not the most efficient way, either ;) )

You could look at the PEAR Mail [pear.php.net] class.

Sekka

2:40 pm on Dec 11, 2006 (gmt 0)

10+ Year Member



Due to problems on our server, and incase any hosting we build for doesn't have the mail() functionality, we use PHPMailer which sends email via SMTP.

So, for each email it must connect to the SMTP server, send it, then close.

I dunno, I'm looking for the professional and most efficient way of doing this.

We have a dedicated server on Linux incase root access is a factor.

Thanks!

barns101

3:31 pm on Dec 11, 2006 (gmt 0)

10+ Year Member



Pear Mail should do the trick. I believe that it can either access sendmail or use your SMTP server, and it should not have to open a new connection each time.

Sekka

3:40 pm on Dec 11, 2006 (gmt 0)

10+ Year Member



Okidoke.

Right, need to install PEAR now. :)