In order to facilitate agreed-upon transactions between your website and its visitors, your website needs to send transactional emails. Transactional emails or "triggered" emails include any email that is triggered by a user's interaction with your website. They typically contain information the recipient wants or needs and consequently have very high open rates. Common transactional email use cases include account creation emails, password resets, account notifications, and webform responses.
When your site is hosted on Pantheon, you will need to use either option to send these emails:
- Simple Mail Transfer Protocol (SMTP)
- A Transactional Email Service like SendGrid
Simple Mail Transfer Protocol (SMTP)
SMTP is an Internet standard for email transmission. Configuring your website to send email via SMTP can improve your users' experience by making sure that emails sent from your website will be delivered and not marked as SPAM. Using SMTP also prevents emails sent from your website (mydomain.com) to an internal email address (someone@mydomain.com) from being blocked internally.
Configuring SMTP Authentication
In order to get SMTP working on your website, first you will need to select or set up an email address with your email provider. Commonly used addresses to send transactional emails include noreply@mydomain.com, contact@mydomain.com, or info@mydomain.com, but you can choose any address that works for your organization. This email address does not need to be unique to your website, but many website owners like to keep the website email separate from all other email interactions. You also need to make sure that if you ever update the password for this email account, you update the website SMTP configuration as well so that you don't experience an interruption in email sending.
Once you have selected or created an email address to use for sending emails, we will need to configure your website to authenticate via SMTP with the following settings:
- SMTP Server (e.g. smtp.office365.com, smtp.gmail.com, smtpout.secureserver.net)
- SMTP backup server (optional)
- SMTP Port (usually 25, 80, 465, or 587 depending on the encryption protocol)
- Encryption Protocol (none, SSL, or TLS)
- Username (the sending email address)
- Password (the sending email address password)
SMTP Settings for Popular Options:
GMail Authentication
If you're using a GMail or G Suite email address, you will need to complete a couple of extra steps to allow your website to complete Google's multi-step authentication process.
- Make sure your email client is updated to the latest version.
- If you use 2-Step Verification, you will need to disable it for this account.
- Once 2-Step Verification is disabled, you will need to allow less secure apps to access your account.
- Finally, you will need to visit https://www.google.com/accounts/DisplayUnlockCaptcha and follow the steps on the page.
Transactional Email Services
A transactional service is an alternative you can use if you don't have access to a mail account that allows you to use SMTP Authentication. Using a transactional email service is also a great way to get modern analytics and reporting, SPAM compliance features, scale email to bulk levels, and have your email delivered more reliably. There are a number of services, including SendGrid, Amazon SES, Mandrill, Mailgun, Postmark and more, that let you send email messages via an API.
Most email apps today strictly scan emails to eliminate SPAM, and one of the many things they use to weed out spam messages is the IP address that's used to send the emails. They check against both blacklists–IP addresses known to send spam–as well as whitelists–IP addresses known to be good in general.
SendGrid
SendGrid is a service recommended by Pantheon. SendGrid can handle massive email campaigns while providing highly detailed and flexible reporting, along with the ability to scale and increase deliverability. SendGrid offers a Free Plan that lets you send 40,000 emails free for the first 30 days and 100/day, forever. Their Essentials package starts at $9.95/month to send up to 100,000 emails per month.
In order to integrate SendGrid with your website, we will need your SendGrid API Key.