Hmm.. I decided to not close and make new connections and it seems to have worked fine. 13,000 emails recieved succesfully, thanks for your help guys. Script took about 5 minutes or so to finish. Now to deal with the message text not showing right.
Well in case anyone else is ever using swift mailer, don't put their mail function in a for statement; it doesn't work . Just send it an array of e-mails instead of just one and it will handle everything fine.
Any chance you'd want to share the code on this? I am having a similar problem with my daily riddles email.
So swift handles the looping through the array for you? Doesn't that cause problems with it trying to send too many mails at once just giving it an array of 13k mails like that?
you might have find some software for that. mailing that many all at once is not good try to split them into 500's list
Have you tested phpmailer. It's my personal favorite. Although I've not used it for 10,000. I have sent thousands with efficient speed.
Hey guys, I'm looking for some consulting on email marketing/mass mailing. Please PM me if your interested. Thanks!
you can play with header('Refresh: 3; url=index.html'); // redirect or reload the current page automatically. logic is: 1. list unsent emails from database and split the emails into 100 or 200 2. then send next unsent 100 emails and update their status as sent in database 3. then get a flag of $done and if $done then checks if it has still unsent emails in database 4. if still unsent emails in database, then header('Refresh: 2; url=mail.php'); // mainly refresh current page 5. if no unsent emails then header('location: done.html'); and include a notification email to you! // redirect to done page
I think the pagination idea is the best. Use for to determine how many pages you will need Query Your Emails 100 at a time Send the emails 100 at a time Then use the header function to go to the next page after three or so seconds (this will take trial and error) header('refresh: 3; page.php?page=#'); At the end, send yourself an email letting you know that the emails have been sent. if($i == $lastresult) { mail(me, emails are done, all emails have been sent sir!); } (the $lastresult is really just the total number of emails you have, in your case it's about 13,000)
yeah. this is how we are giving 'refresh' to browsers, server and ensuring performance. but yes we should use STMP or pop or sendmail service. phpmailer or pear mail.
yes, this works. I have coded a php mailer this way. However, you host may limit the number of emails you send by the hour. Ours sends one every 6 seconds. one to each email because a custom link is provided to opt out. Takes several hours to do about 4000 emails, but it works