Scoutmob and Gmail Insights
I hate to follow up Andrew’s post with another “problem” post but I hope this helps some other developers out there who are trying to implement something similar.
Problem Definition
About midway into the first day of scoutmob.com’s going public, we came upon a huge brick wall in the form of Google’s gmail restrictions on emails sent through smtp. Google has a policy (unbeknown to us at the time) that it effectively shuts down emails sent through their smtp server after a user hits 500 emails in one day. We hit this hurdle and subsequently saw error messages to the effect that a quota had been met and our account was no longer valid.
Context
For Scoutmob we implemented a system for them to have users send themselves an email or an sms form of a deal posted on their website. Since we used Ruby/Rails on the backend we simply used the smtp plugin to be able to send emails through their gmail corporate email account.
The smtp plugin used was the ambethia-smtp plugin – for those interested in obtaining it this site was helpful in setting it up. This seemed like the most appropriate option for our purposes, especially since the SMSFu plugin we used for sending sms messages requires an smtp server in order to send sms messages to phone numbers.
Solution
1. Gmail Premium
Our first thought was to buy into Gmail’s premium plan.
Benefits: Quick solution. Gmail’s great product and support for issues.
Drawbacks: Increased costs and the limit for emails sent out of a premium plan account is 2,000. Although this was significantly more than the 500 limit it still was too small for us.
2. Sendmail
Setup sendmail on our servers and use localhost as the smtp server.
Benefits: No limit on number of emails sent. Greater control and less restrictions.
Drawbacks: The onus lies on us to tackle issues when things go wrong. Another possible issue is that since we aren’t a trusted gateway, spam filters, ISP and more importantly, telecoms used for the sms messaging might flag us as malicious emailers.
We decided to use the 2nd option and setup sendmail on our servers. We no longer have to worry about getting shut down by the smtp provider but now there is one more aspect of the site that we must support.
Possible Next Steps
Use Mailchimp’s gem to take care of sending these messages… More to come on that later.