I’ve found that sometimes WordPress websites have problems successfully delivering emails. While making sure you have the correct SPF records in place to confirm your website is allowed to send emails, another approach is to use an email server to send your emails.
When to Use Gmail
Typically, when using an email server it makes sense to use a third-party company that specializes in sending emails from websites (e.g. SendGrid or MailGun). In the case, where the website is only sending email notifications to the website owners (e.g. you have a contact form and need to be notified when it is completed) using a Gmail account is a valid option.
Why Not Use Gmail to Send Email
Anytime you’re sending emails to visitors, Gmail is a bad choice. The recipients of the emails may mark them as spam and create a whole new set of headaches with your emails. Another potential problem is going over the Gmail email sending limit.
WordPress Send Emails via SMTP Plugin
I like the WP Mail SMTP by WPForms plugin for sending emails. It has paid options, but the free option is sufficient for my narrow use case.
Configuring WP Mail SMTP for Gmail
Allow Simple SMTP Login
By default, Gmail does not allow sending via SMTP with a basic username and password. However, you can enable this at the Less Secure Apps settings page.
You’ll want to turn Allow less secure apps
on.
WP Mail SMTP Settings
For the following, I’m going to use the gmail account example@gmail.com
, the name Sal Ferrarello
, and the password mypassword
.
- From Email
example@gmail.com
(replace with your email) - Check Force From Email
- From Name
Sal Ferrarello
(replace with your name) - Leave unchecked Force From Name
- Return Path check
Set the return-path to match the From Email
- Mailer select
Other SMTP
- SMTP Host
smtp.gmail.com
- Encryption
SSL
- SMTP Port
465
- Auto TLS
Off
- SMTP Username
example@gmail.com
(replace with your email) - SMTP Password
mypassword
(replace with your password)
Leave a Reply