How to Send Emails in WordPress Using the Gmail SMTP Server
Are you having trouble sending emails from your WordPress site? One easy way to solve this is by sending emails from WordPress using the Gmail SMTP server. In this video we will show you how to send email in WordPress using the Gmail SMTP server.
Text version of this tutorial:
http://www.wpbeginner.com/plugins/how...
If you liked this video, then please Like and consider subscribing to our channel for more WordPress videos.
Check us out on Facebook:
https://www.facebook.com/wpbeginner
Follow us on Twitter:
http://twitter.com/wpbeginner
Join our circle on Google+:
https://plus.google.com/+wpbeginner/
Checkout our website for more WordPress Tutorials
http://www.wpbeginner.com/
Summary of this tutorial:
You can use one of the free gmail accounts to send out WordPress emails but for better deliverability you would want to use the Google Apps for Work.
It will require you to edit some MX records on your domain name but it will allow you to have your domain as the address in your email.
Start by installing and activating the Gmail SMTP plugin for WordPress then go to Settings, Gmail SMTP to configure the plugin settings.
It will require you to create a web application with your Gmail account to get an API key to allow you to use Gmail's SMTP servers.
When setting up the application you will want to select the Gmail API for Web browser(Javascript) and you will be accessing the user data.
The API wizard will walk you through the steps that you need to update for the email to work properly.
With that complete you will be able to add your ID and secret keys to the SMTP plugin's settings page.
Fill out the rest of the SMTP settings page, the type of encryption is TLS and the SMTP port is 587.
With that set up you would want to use the Grant Permission button.
If everything is correct then you should see the status is connected and you will now be able to use Gmail SMTP to send emails from your site.
Closed Caption:
Hello and welcome to WPBeginner.
In this video I'll walk you through how
to set up SMTP with your Google Apps.
To get SMTP set up with your Google Apps
you first want to set up an email in
Google Apps for work and then there will
be a few sites that you will need to
access. One of them will be the Google
Apps for work
you'll want your WordPress dashboard and
your website cpanel so make sure you
have access to those. So the next thing I want to talk about is why are we going over this?
You could to set up smtp with your gmail
account and that would be fine but if
you're running a business website
tell me which one looks better. If you're
running a business website then you want
something more reputable for email
something like this versus a gmail
account like that.
So if you're ready we'll get started and
we'll walk through how to set up your
email to work with Google Apps for work
and then we'll show, I'll show you how to
set it up on your website. First thing
we'll do is you'll want to go to the Google
Apps for work and there's a 30-day free
trial
here you'll need to enter some information on the next screen it'll ask you if
you have your own domain or if you need
to buy one.
It's only eight dollars a year and it
include the automatic email setup. For a
lot of you probably already have your
own domain and actually that's what we
have so we'll say we're using our own domain.
On this screen you'll want to create
your first email account and that will
probably be the one that I just put in.
Once you accept it all and fill in all
the information then you can get started
Alright once you've set everything up
then you'll see this screen where you
can also add more people to your account.
If it's just you then you're already
good to go.
The other thing you'll want to do is
verify your domain and then we'll set up
the emails as well. Since it is just us
we're going to say we've already added
all the email addresses that we want
click next. Now we need to verify our
domain and setup the email. The easiest
way to do that is we're going to add
this meta tag to the header of our
website so I need to copy all of this
click copy
and we'll go to our WordPress dashboard
want to go to plugins add new
and we're going to search for insert
headers and footers. This just allows us
to add code to our website easily. We'll
activate the plug-in after we install it.
Once it's installed and activated
you want to go down to settings insert
headers and footers and we can put that
piece of code right there and we'll
click Save.
Right now we need to go back and say
that we've added the meta
all right now that we've added the meta
tag to our home page
it's telling us to go to the control
panel for domain so we need to access
the back end of our domain. So I'm going
to go to the back of my website and go
to the cpanel I'll tell Google that I
have opened to the cpanel. Alright the
next thing we need to do is we need to
create new MX records for all the google
apps on our cpanel area. We'll go one by
one and you want to make sure that you get
the priority entered, the name host alias,
and the value on the destination.
So let's go to the back end and so this
is our cpanel I'm looking for mail and I'm
looking for MX records.
Select the domain that we're working
with. So I'm going to put in the destination and
the priority and I'll click Add record.
Okay now that I've done that one you'll want to
do the same thing for the, for the next four
or five items.
Alright now that we've entered all of
those I need to go back to Google and say
that we've created the MX records.
It's also saying to go ahead and delete
any of the existing MX records so I'll
need to do that.
And finally we need to save the records
and the cpanel already does that so
we're good to go.
So we've verified domain and we'll set
up email. Alright and then you should get a
verified confirmation here
so now we can click Next
and then even though you have the trial
they want you to go ahead and pick a plan.
We're going to choose the five dollars a
month per person and I want you to set
up your billing.
So we'll say that that's what we want
and we'll continue.
All right from here you'll want to add your
billing information, again
they won't charge until after the 30
days and you'll want to decide if you want
to pay monthly or if you want to pay all
of it at once and then once you're
finished then we can walk you through
how to set it up on your website.
Alright now that we have Google Apps
for work set up we need to go back to
our WordPress dashboard and we need to
set up the smtp to work with our google apps.
I'm gonna go to plugins add new
and we're gonna
search for a plug-in called gmail smtp
That will help us set it up and this is
the one we want so I'll click install
now and then activate the plugin
and you'll see you get a message up here that
you can't do anything until you set
it up so we'll do that now.
You can go to settings or if you ever need to access it again
you also can go under settings in gmail
smtp. So we'll click on settings
and from here we need to create a new
web application on the Google console so
I'm going to open that in a new tab
so we can do that.
When you first go to the developers
console you'll want to accept and
continue for your new account.
I want to agree to their terms and
conditions and click continue.
You see down here it's creating our first
project.
Now that our first projects been created
we want to go to credentials.
Under here under add credentials to your project we want to
we're going to use Gmail API and what its
going to be calling is from a web browser
javascript and we want to be accessing
the user data. And It'll ask what
credentials do I need and from here we
can name it. We need to add our website
under the authorized javascript origins
the authorizer redirects. go back to your
Google Dashboard and find this authorized redirect URI here and we'll copy that
because we need to paste that here.
Alright and once you filled that out we've done
this one we've done this one we can
click create client ID.
Fom here we just want to use the email
address that we set up and you can put
product name or your website here,
your website name here
and click continue
Alright now it says that we've set
everything up and you can download that
later we can just click done.
Alright now you see a list of all the
credentials that you've created this is
the one that we've been working with so
I want to click on that name because i'm
looking for the client ID and the secret
client secret as well. Go back to my
dashboard
copy the secret paste it there. Alright now
on my dashboard I'm going to go ahead and
fill out this information the OAuth, the OAuth email address is the one that we set up.
You also want to enter that in the from
address as well add the name, type of
encryption we want, TLS for the smtp port we need to do 587 and we can click Save Changes.
Once we hit Save Changes we need to scroll all the way down and click grant permission.
This allows both the website and Google
to talk this is what people will see
when they allow it.
You see you get an access granted
successful message so we're good to go there.
We also see that it's connected and
everything looks good to go
and now you've successfully set up smtp
with your Google Apps for work on your website.
If you like this video click on
the like button and go ahead and leave
us a comment there we'd love to hear
from you and subscribe to our YouTube
channel to get the latest videos.
Video Length: 08:53
Uploaded By: WPBeginner - WordPress Tutorials
View Count: 29,439