I moved my WordPress-powered site & blog to Microsoft Azure from another web hoster last week. The move was pretty easy and the site is running MUCH faster on Azure but there were still a few little details that needed to get worked out. The big one was figuring out how to get notification emails from WordPress. The trick was finding an SMTP server that I could use. Two facts: 1) Windows Azure doesn’t provide you with an SMTP server and 2) I host my email on Office 365.
Last week, I was searching around on the internet(s) for answers and kept coming back to the same page on how to configure Office 365 SMTP relay. I wanted to do the SMTP Relay option that authenticated using IP addresses rather than the account for my mailbox because I’m not a complete fool and I didn’t want to put my email mailbox’s username and password in cleartext in WordPress. I tried and tried and tried and tried and I couldn’t get it to work.
This morning, I ran the same internet search and came back to the same page. Same dead end…but WAIT! There’s updated information on this page now! There’s a “Tip” that says “This method cannot be used with Azure or addresses on a Policy Block List.”
Answer #1: You can’t use your Office 365 account to send emails from WordPress hosted in Windows Azure without a password. Not the answer I wanted but at least it explains why it wasn’t working.
Answer #2: Use SendGrid to Send Emails from Azure.
Next, the gods of the internet(s) saw fit to show me this page from the Azure documentation titled “How to Send Email Using SendGrid with Azure”. (Well, that sounds promising.) Here are the quick steps to configure it:
1. Log into your Microsoft Azure Dashboard — http://manage.windowsazure.com
2. Click the New button in the lower left
3. Click Store
4. Choose SendGrid Email Delivery
5. Follow the rest of the steps to set up your SendGrid account.
6. When your SendGrid account has been provisioned, you’ll see a menu at the bottom of the screen with a button that says Connection Info. When you click this button, it will display the SMTP Server address, your username, and your password.
Answer #3: Use WP Mail SMTP to configure your WordPress email settings and to send test emails.
Now that you have an SMTP server to use, you need to plug those values into WordPress. I found the WP Mail SMTP WordPress Plug-In to be extremely helpful for this. After you install WP Mail SMTP, you’ll get a new option in your WordPress Settings menu named “Email”.
Plug your SendGrid account settings into the Email configuration form from WP Mail SMTP and send a test mail. This time it should work.
I hope this helps!
-Ben
Leave a Reply