I'm trying to send a lot of emails from my PHP script. I'm using PHPmailer. I tried to send 1000 emails but only managed to send about 600 of them. So my question for the forum is:
How do I send lots of emails? Are there different methods? I do not want to send one email with 1000 email addresses. I want to send 1000 unique emails.
Sending bulk emails
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
most hosts limit how many mails you can send within a given period of time. After you check what your host allows, write a script that you can combine with cron to make a certain percentage less than that, say 10%, than your host allows in an hour, spread out over the period. You'll need a way of tracking which email addresses from your list have been sent the particular email in question...
Just be aware you could be labeled as a spammer pretty easily..
Just be aware you could be labeled as a spammer pretty easily..
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
in my experience of using PHP's mail() if you send more than 10 or so emails the browser will time out (using the default time out value in php.ini), so you would have to add extra time to when it times out to the script each time it iterates the loop. so judging on that php isnt really supposed to be used to send bulk mail, unless you stick with what feyd said and use cron to send a certain amount of emails every so often; which isnt a half bad idea - but maybe you would have to use a database to store the email you got up to before you stopped sending last time and need to carry on from when it begins again.
personally i would use some software on my home pc to send 100 or more emails.
also, if you bought the mailing list, beware if you got it cheap chances are 50% will be bounced back to you because of bogus addresses.
personally i would use some software on my home pc to send 100 or more emails.
also, if you bought the mailing list, beware if you got it cheap chances are 50% will be bounced back to you because of bogus addresses.