dcolumbus
dcolumbus

Reputation: 9722

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.

Upvotes: 3

Views: 2646

Answers (4)

tadman
tadman

Reputation: 211540

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:

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.

Upvotes: 3

dcolumbus
dcolumbus

Reputation: 9722

First, thanks for everyone that has helped me with this thus far.

The answer I was looking for is http://mandrillapp.com/

This is the service behind MailChimp and it rules in every way!

Upvotes: 1

Ja͢ck
Ja͢ck

Reputation: 173532

The truth is that the less money you're willing to spend on email sending, the more things you have to do yourself, such as:

  • White listing your sender IP address (especially if you're on shared hosting this can be a PITA, because the other users can mess things up for you).
  • Setting up SPF and DKIM to add trust for mail hosts (Hotmail, GMail, etc.)
  • Checking bounce emails
  • Handling ISP complaints

This is also amongst the things that third party providers charge you for; if you don't wish to bother with any of the above, feel free to use providers such as Mailchimp, Bluehornet, etc. Make sure they provide what you need before you whip your wallet, some might have surprising hidden costs (such as charging you extra for API usage, use of transactional emails, life-cycle emails, etc.)

If you don't mind doing a few of the above (like checking bounce / complaint emails and making some simple DNS changes) you could sign up for Amazon SES; it has a proper API and their email charges are the lowest I've seen so far and recently they have introduced DKIM (signed emails) support. You can also configure your sendmail (assuming dedicated hosting) to talk directly to SES, so it's easy to hook up any mail() based solution and run it.

Upvotes: 2

SeanCannon
SeanCannon

Reputation: 77956

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.

Upvotes: 4

Related Questions