One of the challenges with setting up a new WordPress site is how to handle email. Let’s talk about how to do this professionally.
Out of the box, WordPress will use the default mail() function. In some instances, on some hosting providers, this may work. However, most likely you’re email provider (such as Gmail or Microsoft O365) will block emails sent from the mail() function.
Email providers block emails sent this way because they are often used to spam. To send emails reliably from your website you’ll need to utilize a provider that can help you do that.
If I’m using AWS, I recommend Amazon SES. Mailgun has also been helpful.
Both of these services will reliably send email for you — the downside is that they can be complicated to set up.
Here is the basic strategy for setting up an email account provider:
The challenge with Amazon SES’s service is with the connection details. To create an SMTP account that you’ll input into Fluent SMTP, you need to:
If this seems like a lot of steps, you’re correct. It is. You may be able to get away with fewer — simply having Fluent SMTP send email using the default settings may work and provide you with an email log. However, if it doesn’t — you’ll need to utilize a professional service.
These services exist due to the problem of spam. SES and Mailgun force you to configure your domain and validate your identity so they can track your usage. If you’re spamming people, their service will get penalized and you’ll get shut out. The whole setup is designed to prevent people from using mail to send unwanted email. This unfortunately adds a lot of trouble in initial mail setup.
But once it works, you can generally let it go without another thought.
© 2024 Return on Development, Seth Hayward