Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending Bulk Email To Members of Application

I've been reading up on sending mass email to a user-base, and I'm not feeling comfortable using the PHP mail function. It tends to be too simple, spammy and unreliable.

But that leads me to my question... for a custom application, what should I be using to send email to potentially hundreds of people? ...or is mail okay to use?

I appreciate the help.

like image 278
dcolumbus Avatar asked Jan 22 '26 05:01

dcolumbus


2 Answers

I would use a third-party service. There are several of them. They ensure the emails are sent from white-listed IP's and have spent a LOT of money on legal prep for terms, privacy policy, etc to ensure the ISP's play nicely with the incoming mail.

If you're only sending mail to potentially hundreds of people, and not hundreds of thousands of people, PHP's sendmail will handle the load fine. You should be worrying more about the newsletter content and the opt-out easiness than the capability of PHP to send your email. For small campaigns to hundreds of people, check out MyEmma.com as an example of a small-list solution.

like image 160
AlienWebguy Avatar answered Jan 24 '26 17:01

AlienWebguy


What you're probably looking for is an API to offload your email calls to and let a service handle the delivery for you. Sending a large number of email messages from PHP can be tricky as if it's not done quickly enough you run the risk of time-outs, and tracking which have been sent is always troublesome if you want to re-try a big batch.

Not surprisingly there are several companies which offer an email API service to make this sort of thing significantly easier than doing it yourself:

  • SendGrid (PHP example)
  • Mandrill (PHP package) from MailChimp
  • Postmark (PHP libraries)
  • PostageApp (PHP example)
  • MailGun (PHP sample)

While I'm a developer for PostageApp, but I encourage you to try out many of these to see what works best for you.

In most cases you need to re-write a small portion of your application to work with the particular API or library used to access the API, and once that's done you can send a very large number of messages with one quick call. The delivery of those messages becomes the responsibility of your provider.

like image 45
tadman Avatar answered Jan 24 '26 19:01

tadman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!