Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send mass emails from PHP

I've got 80,000 users on my site and i've recently turned away from the forum script i've been using and built something very simple myself that works just as well (the forum script was too bloated and resource intensive for my simple site)

The only thing i've lost is the ability to mass email all my members.

So i'm looking to come up with a script to do it myself. After looking around (including questions on here) I decided using Swift Mailer would be a good idea.

However i've been through all the documentation and can't see how to send say "100 at a time" and i'm not sure how to go about it.

To put it simply. I have an admin panel with a form with two inputs "subject" and "message". When I click submit what is the safest way for me to send 80,000 emails without crashing my server or being marked as spam?

I'm on quite a beefy dedicated server so don't have the problems associated with shared servers.

Thanks in advance for any advice!

like image 364
Rob Avatar asked Nov 14 '22 11:11

Rob


1 Answers

Safe option is to send emails one after another. I usually send no more than 10 e-mails evey 10 minutes. Simple script fired by cron is all you need.

Sending many emails at once is one thing but have them all delivered and passed by servers filters is diffrent thing...

like image 76
smentek Avatar answered Dec 14 '22 16:12

smentek