• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Draft / Sending WordPress Emails Through Gmail

Sending WordPress Emails Through Gmail

Last updated on November 11, 2019 by Sal Ferrarello

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.

Gmail Allow Less Secure App Access 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)
Sal Ferrarello
Sal Ferrarello (@salcode)
Sal is a PHP developer with a focus on the WordPress platform. He is a conference speaker with a background including Piano Player, Radio DJ, Magician/Juggler, Beach Photographer, and High School Math Teacher. Sal can be found professionally at WebDevStudios, where he works as a senior backend engineer.

Share this post:

Share on TwitterShare on FacebookShare on LinkedInShare on EmailShare on Reddit
Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Draft, Solution Tagged With: email, SMTP, WordPress, WordPress Plugin

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in