It is a problem as old as the web itself: which server or service to use when we need to send emails from our website or local computer? It may sound an easy answer, but if your hosting provider does not offer an out-of-the-box service with fair usage rules, setup a SMTP server yourself is a task that can get messy really fast – either to setup and to maintain it.
What would you use? sendmail, postfix, postmaster, procmail, qmail? Damn, probably half of these options even aren’t smtp servers. And after you find one that looks good, there are so many configuration options and terms to deal with that you will want to swear. Not to mention spammers trying to flood your server.
So, instead of going through this deep, dark and painful way, I found out that using a third party SMTP service is one of the best decisions one can make. For the last months I have been using SendGrid and I am totally happy with it: easy and intuitive panel, simple and clear setup instructions, good prices and – the better – they have a FREE account, which you can use to send up to 200 emails per day. If you think for a while, 200 emails per day is A LOT, if you have a small website or small delivery of emails. It is also perfect when you are developing at your local machine and need to test the email delivering of something (like a registration or recover password form).
To integrate you only need to change three SMTP settings in your application:
- SMTP Server: smtp.sendgrid.net
- Username: your account username (the same you use to login in the website)
- Password: your account password (the same for the website)