Are you looking for a reliable way to
send emails from your WordPress website?
Well keep watching because in this
video you'll learn how to send email in
WordPress using the Gmail SMTP server.
SMTP or Simple Mail Transfer Protocol is
the industry standard for sending emails
and since it uses proper authentication
it increases your email deliverability.
Basically using Gmail SMTP server keeps
your emails from going to spam. To use
the Gmail SMTP server you can either use
it with your free gmail account like say
JaneSmith@gmail.com or you can use
the Gsuite paid plan where you get your
own email address with your domain name
like say JaneSmith@mysite.com.
You'll want to decide which way you want
to go but everything else in this
tutorial will be the same whether you
have the free or the paid so if you're
ready let's get started.
To get things set up on your website
we'll be installing a plugin called
WP mail SMTP plugin. To do that let's head
over to our WordPress dashboard, we'll go
down to plugins area add new. In the
search box let's type in WP mail SMTP
this is the one we want by WPForms so
let's click install now. Once you install
it you'll also want to make sure you
activate it. Once it's activated you can
see settings down here or if you ever
need to go to it afterwards you can go
to settings WP mail SMTP here. Now we
need to set it up. In the from email add
the email address that is set up with
your gmail account you also want to put
in your from under mailer since we're
using Gmail let's select the gmail
account hit the set the return path to
match the from email and now let's
scroll down because we need to fill out
this information here. To get the client
ID and client secret we need to create a
project in the Google developers console
area so we'll open up a new tab.
If you haven't created any projects then
you'll have a button here to say create
project otherwise you can go up here and
click the plus button to create a new
project and click create. Now we need to
enable the API and services so let's
scroll down, we're looking for the enable
API and credentials. From here we need to
find the one that we're looking for you
want to enable the Gmail API so let's
enable that here and click enable. Next
we need to create credentials for this.
So click on the button for create
credentials from here you want to make
sure web browser and JavaScript is
selected and then where, what data will
be accessing you need to select user
data. Then we need to do what credentials
do I need let's give this a name. Under
authorize JavaScript origins enter your
web address here and for this authorized
redirect URIs we need to go back over to
our WordPress dashboard and copy this
information. Go back over, right click in
the authorized redirect and paste. Now
that we've done all that let's click
create client ID. Now to setup the OAuth
consent screen you need to add the email
address that will be used and add the
product name that will be shown to users.
This is usually just you so alright once
we're done with that let's click
continue. From here we can copy our
client ID so we'll copy that, head back
over to our dashboard here we can paste
that and we're good but we still need
the client secret so let's head back
over and we'll say done. From here we can
come over here and click the edit button
and that'll bring up our client ID and
our client secret. From here we can get
our client secret make sure that you
only copy the data and not any
accidental extra spaces. So once you copy
that head back over to client secret and
paste that in there. Now we can save our
setting
and now when we scroll down we can say
allow the plugin to send emails using
your Google account. So once I click that
you'll see the screen to authorize the
website to use your email address let's
allow that. Once you've done that you'll
see a success notification saying that
the API project is now connected to our
website and now you're all set up you
can even send an email test to make sure
everything works correctly. Now there's a
second method that you can use and that's
setting up the Gmail SMTP as the SMTP
sender. This will allow you to manually
connect your Gmail's SMTP servers to
send for your WordPress emails it is not
as secure as the OAuth so we definitely
recommend the OAuth but it's a way that
you can get through it if you need to.
To do that let's head back over to our
settings area and make sure you enter
your email and your from name correctly
and instead of using the Google we'll do
other smtp we'll scroll down to our SMTP
information and you'll need to fill out
this information from Google. For the
SMTP host you need to setup
smtp.gmail.com use the port 465 we want
encryption keep this on by default for
authentication let's turn that on and
from here you'll need to add your
username and password. This is your Gmail
or your or this could be your Gsuite
personalized domain name as well. Set up
the password that you use for your email
account and save settings. Now no matter
which version you use you can always do
a test email so we'll do a test email to
make sure that there was no problem and
you see once you send a test email
you'll get a notification that it was
sent successfully. Did you learn
something from today's video? If so
subscribe to our YouTube channel and
we'll send more helpful tips to help you
manage your WordPress website and thanks
for watching
