Re: [PHP] Sending out large amounts of email

2009-03-06 Thread Richard Heyes
Hi,

 Our company is merging with another company and newsletter now needs to go
 out to more than 100.000 people.

Out source it. It will cost you far less in the long run. And the
short run. I tried Jango mail and they seemed OK, though I didn't have
to talk to their support, and my use was very brief. These types of
company will also have far more success in getting the emails
delivered (and not flagged as spam).

-- 
Richard Heyes

HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.net (Updated February 28th)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Sending out large amounts of email

2009-03-06 Thread Bob McConnell
From: Chris
 Brian Hansen wrote:
 2009/3/6 Chris dmag...@gmail.com mailto:dmag...@gmail.com
  
 
 What about 10,000?
 
 
 I haven't been able to send out more than 6000 at most. It is
proberly 
 caused by a limit set in Postfix as you wrote.
 
 If you're sending emails one by one in a mail() call there is no limit

 (one email per recipient)
 
 If you're trying to cc or bcc the email addresses, then there probably

 is a limit.

You should also talk to your ISP and email admins to find out how to
avoid ending up on a SPAM blacklist after sending out that many emails.
You're likely to trigger more than one automatic listing with that many
messages.

Bob McConnell

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sending out large amounts of email

2009-03-05 Thread Chris



I have been running some tests with PHP mail() function, PHPMailer and
PEAR:Mail using 6000 mails at once.

Here's a sumarry of some of the results:

PHP mail() send out 6000 mails in 1.75 seconds.
PHPMailer using PHP mail() send out 6000 mails in 1.87 seconds.
PHPMailer using SMTP send out 6000 mails in 12 seconds (Error without
succes).
PEAR:Mail using PHP mail() send out 6000 mails in  20 seconds (Apache
reached 100% during this time).

Running several test on PHPMailer using SMTP failed completely with more
than 1000 mails.


Probably if you tried to send  1,000 in one smtp conversation. Postfix 
has a setting that will control this (as far as I remember anyway). 
You'll need to cycle the connection.


- connect
- send 100
- disconnect

repeat.


Everywhere on the net I read that sending out mail using PHP mail() is slow
and it is a bad idea and that using some mail class with SMTP directly would
be much better. I have tested the run my tests with Postfix as the SMTP.


Depends on the situation. Sometimes using an smtp server is better. Some 
hosts only let you send 'x' emails an hour or even 'x' emails every 5 
minutes so you have to pause between each email being sent so you don't 
flood their servers.


If you're only using your server and your tests show php mail() works, 
then use it.


PHPMailer comes in very handy when you have to do one or more of the 
following:

- send multipart emails (html + text)
- include attachments
- embed html images in the content
- possibly send to an smtp server

All of that functionality is already built, works, tested etc - you 
don't need to do it all again.



I have gotten the best results using PHP mail(). When the volume is belove
6000 PHP mail() is by far the fastest.


What about 10,000?


What is the best solution in real life dealing with huge amounts of mail?
PHP mail() vs. some class using SMTP or binary sendmail (or wrapper)?


mail() internally calls the wrapper, I doubt you'd see much of a 
difference there.


--
Postgresql  php tutorials
http://www.designmagick.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sending out large amounts of email

2009-03-05 Thread Brian Hansen

 What about 10,000?


I haven't been able to send out more than 6000 at most. It is proberly
caused by a limit set in Postfix as you wrote.


Re: [PHP] Sending out large amounts of email

2009-03-05 Thread Chris

Brian Hansen wrote:



2009/3/6 Chris dmag...@gmail.com mailto:dmag...@gmail.com
 


What about 10,000?


I haven't been able to send out more than 6000 at most. It is proberly 
caused by a limit set in Postfix as you wrote.


If you're sending emails one by one in a mail() call there is no limit 
(one email per recipient)


If you're trying to cc or bcc the email addresses, then there probably 
is a limit.


--
Postgresql  php tutorials
http://www.designmagick.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sending out large amounts of email

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 6:20 PM, Brian Hansen greencopperm...@gmail.com wrote:
 Hi.

 Our company is merging with another company and newsletter now needs to go
 out to more than 100.000 people. Before it was only a couple of thousands.

 I have developed a mail queue using a database and a cronjob, but I am not
 in doubt as to what particular solution I need to implement.

 I have been running some tests with PHP mail() function, PHPMailer and
 PEAR:Mail using 6000 mails at once.

 Here's a sumarry of some of the results:

 PHP mail() send out 6000 mails in 1.75 seconds.
 PHPMailer using PHP mail() send out 6000 mails in 1.87 seconds.
 PHPMailer using SMTP send out 6000 mails in 12 seconds (Error without
 succes).
 PEAR:Mail using PHP mail() send out 6000 mails in  20 seconds (Apache
 reached 100% during this time).

 Running several test on PHPMailer using SMTP failed completely with more
 than 1000 mails.

 Everywhere on the net I read that sending out mail using PHP mail() is slow
 and it is a bad idea and that using some mail class with SMTP directly would
 be much better. I have tested the run my tests with Postfix as the SMTP.

 I have gotten the best results using PHP mail(). When the volume is belove
 6000 PHP mail() is by far the fastest.

 Would someone mind sharing experience and perhaps shedding some light on
 this issue?

 What is the best solution in real life dealing with huge amounts of mail?
 PHP mail() vs. some class using SMTP or binary sendmail (or wrapper)?

 All insights would be appriciated.

 Best regards.

 Brian


I've done a lot of work trying to get mail servers/php code to work
reliably together in sending bulk mail.  It's not trivial business. If
you have control of the setup, change the mail server to just queue
your mail instead of sending it directly.  I did this and it solved a
lot of really nasty headaches.  I use Zend_Mail  this method to send
custom generated html emails to a lot of people and it never fails.

It might not work for you though, so good luck!

-- 
http://www.voom.me | EFnet: #voom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php