If you’re not an internet guru, the Gmail SMTP settings can be pretty confusing. What’s more, if you use WordPress, getting your website to deliver email correctly, without WordPress Support, with all of the different hosting environments can be a real trick.
Using your web host for email is not entirely dependable and sometimes can even be impossible depending on a number of factors. Because of that, a lot of WordPress users and developers choose to use a method other than PHP mail to send email, which is what WordPress uses by default.
Wait, so what exactly is SMTP anyway?
For the uninitiated, SMTP stands for Simple Mail Transfer Protocol. It’s the standardized method for sending email everywhere, and is certainly the most popular delivery method across all major email providers.
While SMTP is an essential part of delivering email reliably from your website, you can also use these settings in any standard email client if you’re trying to set up Gmail to work on your desktop or cell phone.
Default Gmail SMTP Settings
- Gmail SMTP server address: smtp.gmail.com
- Gmail SMTP username: Your full Gmail address (e.g. [email protected])
- Gmail SMTP password: Your Gmail password
- Gmail SMTP port (TLS): 587
- Gmail SMTP port (SSL): 465
- Gmail SMTP TLS/SSL required: yes
In this article, I won’t get into too many details about the various SMTP options available, but there are some popular services using the SMTP protocol besides Gmail. Some great examples are hosted email services like Mandrill, Sendgrid, or even something like Amazon Web Services SES. There are a whole bunch of other similar services that I could list here, but that’s not the purpose of this post. Our official recommendation is to use SendGrid for email delivery and avoid using Gmail SMTP as your outgoing email server (you’ll see why below), but for those who want to be adventurous, this post is for you.
In this post I want to show you how to setup and configure the WP Mail SMTP WordPress plugin, your Gmail SMTP settings, and how to navigate some pretty confusing security restrictions in order to get an email from point A to point B. We spent several hours diagnosing and troubleshooting this email delivery issue for a client and figured we’d save you the heartache by publishing a walk-through.
The reason we chose SMTP for this particular customer is because Gmail already has SMTP support built in, and the customer wanted a quick solution that wasn’t going to require any kind of recurring costs. Considering there are only a few users on the site, using Gmail to send their outgoing mail and form notifications was a reasonable solution. For sites with higher volume of emails, or critical delivery, or where you want more flexibility, some of the other options I listed above are much better suited.
Install the WP Mail SMTP plugin
The first thing you’re going to want to do to setup the WP Mail SMTP plugin is to install it on your site. Easy enough right?
Note: If you choose not to use WP Mail SMTP, that’s fine. But do note we found several SMTP plugins that were storing unmasked passwords in plain text, which can be a huge issue for your email security. If you’re going to use SMTP to deliver email, WP Mail SMTP is our recommended method.
Connecting Your Gmail Account
Note: If you try and use a personal gmail account other than the method below, you’ll be required to enable “Less Secure Apps”. Google has gone on record to say they do not recommend this method, and will be retiring the Less Secure Apps loophole some time in 2020.
The next step is also pretty straight forward. You’re going to need your gmail username and password, and a few SMTP server settings which we’ll provide below.
Navigate to Settings –> WP Mail SMTP in your WordPress dashboard.
From the settings screen you’ll choose the following options:
- Your FROM email – this is the email address you want to show as the sender when WordPress sends emails.
- Your FROM name – This is commonly either the individual’s name for a personal website, or a business’ name for a business website.
- Your Mail Service – We’ll be using Google in this tutorial
The other options will change depending on the service you choose. The plugin has links to handy documentation to show you exactly what needs to be done in order to configure your specific service.
- Configure Gmail for WP Mail SMTP
- Configure Mailgun for WP Mail SMTP
- Configure SendGrid for WP Mail SMTP
Once you’ve completed the setup required by their documentation, Save Changes and you’re ready to send email using SMTP! But we wouldn’t be very helpful if we just wrote a tutorial about how to follow a tutorial, would we?
Setting Up WordPress Email Delivery with Google SMTP
While the instructions in the WP Mail SMTP documentation are relatively straightforward, we can do better. In the video below we walk you through the setup and configuration of the app required by google to route email through their SMTP servers.
It’s not the most straightforward process in the world, but it only takes about five minutes to get started, and then you can route all of your mail through Google’s SMTP servers at no additional monthly cost.
Configuring your Gmail SMTP settings to send mail from WordPress isn’t quite as easy as it used to be. There are better and more simple alternatives available, but when you need a PHP mail alternative, and you don’t want to pay any recurring fees, Google provides a nice service and WP Mail SMTP makes it relatively straightforward to get up and running.
Are you using built-in PHP email for WordPress? Or some other method? Have you run into any other strange quirks setting up alternate email routing? Hit us up in the comments and we’ll get into some lively discussion!