Over the past 18 months, we’ve been rolling out WordPress to our campus users. The process has been going really well, but we found ourselves struggling in one particular area: transactional email to users.
These types of emails would include account setups, password resets, etc. Since we host our WordPress installation off-campus, somewhere in the tubes between there and our mail system here the mails were being eaten, quite possibly by a large, scary email-eating koala bear. In reality, it was probably an overzealous filter somewhere on our campus end that couldn’t guarantee that emails coming from our Rackspace box to campus really were legit and really were from a University account.
This made creating user accounts very labor intensive. Instead of just emailing login details, password reset requests and more directly to the user, we found ourselves creating an account for a person and immediately resetting their password, and then giving them the login details. Same went for password changes, they were never getting the transactional email to reset their passwords, so they were calling us. Not efficient.
Enter SendGrid. They are one of a few providers of email service, but unlike MailChimp or Constant Contact, they aren’t about the marketing and list management end of emails. They are about providing a delivery gateway to ensure that emails reach their intended destinations with a high degree of reliability.
After setting up an account at SendGrid (look for the free plan at the bottom of this page to try it out. You get 200 emails per day and we’ve never come close to reaching that), SendGrid’s documentation directed us to a page about integrating SendGrid with WordPress.
Using the WP Mail SMTP plugin, we are able to now avoid using the default
wp_mail() and PHP mail commands from our server and instead we have our transactional email sent via SendGrid. To keep the admin panel from showing up and potentially confusing users, even admin users, the plugin allows you to put some details in your
wp-config.php file. That code looks like this:
define('WPMS_ON', true); define('WPMS_MAIL_FROM', 'email@example.com'); define('WPMS_MAIL_FROM_NAME', 'Gallifrey University CMS'); define('WPMS_MAILER', 'smtp'); define('WPMS_SET_RETURN_PATH', 'false'); define('WPMS_SMTP_HOST', 'smtp.sendgrid.net'); define('WPMS_SMTP_PORT', 587); // define('WPMS_SSL', ''); define('WPMS_SMTP_AUTH', true); define('WPMS_SMTP_USER', 'YOURACCOUNTNAME'); define('WPMS_SMTP_PASS', 'YourAccountPasword');
And what do you know, they’re getting through. Our support calls and requests have dropped, and we can focus more of our limited resources on developing great sites and content with our campus partners. Win-win for everyone.
SendGrid isn’t just for these types of emails – it does much more as you can see in this video:
As you dig more into their system, you’ll see they offer email handling, reports and all sorts of other analytics – they don’t just handle transactional email.
So, SendGrid is and will be a part of any web projects for us (and me outside of John Carroll) going forward. It’s just one more thing I won’t have to worry about.
And that, my friends, is a good thing.