Nov 17, 2010

Email Buggy Joy!

In case you haven’t heard, sending email from web apps is a real pain. PHP’s mail() function is terrible for large numbers of emails because it opens a new SMTP connection for each message. My web host limits outgoing SMTP messages to 100 per hour. If one organization using my system has 50 members, two of their emails would already be exceeding the limit. Sendmail seemed like a good solution, but I found out that my web host even limits these to 200 per hour. I calculated that if I throttled the emails, I could send one email every 16 seconds (4800 per day) and still stay under the limit. But then people’s emails would be delayed, possibly by hours at peak activity times. Gmail also sets limits on outgoing SMTP messages, so I can’t use my account hosted at Google Apps, either.

Beyond the outgoing message limits, deliverability is a problem. You have to set up DKIM and SPF keys in your DNS record, and even then, some email providers will still block you.

I’ve spent the last two days research third party solutions. I’ve looked at basically everything out there: Postmark, Sendgrid, CrtiSend, Socket Labs, and others. I’m close to reaching a decision as to who I’ll go with. I spent a full day setting up my app to be used with Postmark only to figure out that their service will not meet all of my requirements. I’m really looking forward to getting past this bottleneck.

This afternoon I’m taking care of some business related items while I wait for my accounts to be set up with two of those email providers. I filed business name papers with the Secretary of State, and I’m going through about nine months of accounting backlog. Tomorrow, hopefully, I’ll be able to write some code again!

No comments:

Post a Comment