In this video we'll be exploring lots of options for setting up secure and reliable email systems that
WordPress can use.
You'll be setting up several free but robust ways of using best practices for transactional email from
the easy G-mail to the free levels at center grid and spark posts.
You'll be able to take control of outgoing email and separate it from your web hosting account.
By the end of this video you'll have the powerful email sending capabilities needed for e-commerce sites
membership's systems and even internal marketing email making WordPress into the interactive content
management system it can be.
Let's start by making sure you have a live server set up hopefully with a domain name pointed to it
and resolving back to that domain similar to what I have at.
Greg Davis duck.
If you open the students W.P. of course dot com Web site itself you'll remember that we have a resources
link here or down on the resources button here.
There's also a link right at the bottom of the page that if you open the resource page under hosting
we've got a few different hosting programs available.
And firstly I'd recommend checking out site ground because the least expensive plan of shared hosting
at site Ground is called Startup.
If you click the link will open up in a new window and you can go ahead and look at the startup price.
Now the regular price is nine ninety five a month.
But however many months you commit to it's only 395 a month and it even comes with a free domain name
and so in order to get started you just sign up by clicking this orange button and then you can buy
a domain name and for domains I would recommend GoDaddy dot com and you can see I'm logged in and I'm
managing my domains and here's my Greg Davis dot com domain right here.
The way that I point my most of my domains to site Ground is by using name servers and you put in this
information here two different name servers that my site Ground account has given to me back inside
of the resources page at WP dev courses.
Dot com.
The ICO web hosting link points to rob Percival's own eco web hosting Dakoda UK and your course comes
with a free segment a free trial of his hosting program and so if you get a domain and set up a hosting
program as I have taught in a previous video you can have a live host available for a trial period at
Eco web hosting back at students that W.P. of course dot com flywheel is one of my favorite web hosts
and if you sign up using this link the flywheel 60 day free demo site is free instead of a 14 day demo.
You get a 60 day demo at flywheel for being a student at you to me for the WP dev course dot com course.
Finally another free trial which does last for 14 days is at cloud ways which gives you a really fast
instance at the Digital Ocean.
If you sign up for it that way and if you just start by clicking get started and sign up for it.
It will allow you to go through the sign up process and choose which free trial you'd like to use.
If you go with Digital Ocean it will give you 14 days to play with a free website and you can point
a domain name at it and get started setting up the transactional email programs.
Whichever way you've gone about getting a live hosting program together and wordpress installed go ahead
and log into your Wordpress dashboard at your live host and open up the dashboard here.
I've got Greg Davis dot com open and we'll go through how to set up S-M T.P. or transactional email
for outgoing email called as MTV email through Google dotcom first of all let's take a look at the plug
in will be using to set up as A.P. servers through Google services in this video it's called post man
as A.P. Mailer.
And if you click on it you can see the header image.
And so it'll look familiar to you.
And even though it says that it's not quite compatible up to the Wordpress version I'm using.
It does work and I've tested it and it's got more than 90000 installs lots of five star ratings and
I do have the latest version of the plug in installed.
That second post man plug in that you see they're called G-mail API extension is just his older plug
in and it's been deprecated.
So use the newer postman S.M. T-P mailer plug in.
And what I'd like to do is maybe I'll just go back to the log out button and I'm going to use the last
your password button here on the log in page to send myself an e-mail.
I'm going to use my username and click get new password and this causes WordPress to send me an email
and then if I don't click the confirmation link I won't have to reset my password.
But you can use this system to force WordPress to send you an e-mail using its current S-M T.P. settings.
So I've opened up my email client or my email program called Mozilla Thunderbird and I got this email
and it is my password reset email and I'm not going to click this link and reset my password.
But what I will do and I'll have you do in whatever email program you use is to somehow look at the
source code or the headers of the email.
So if I click more and then view source for this e-mail I can see that there is a lot of information
up here that is in there before it goes to the actual content of the e-mail.
Here at the bottom of this e-mail header can reveal a lot about where your e-mail is going and coming
from.
And you can see that as I go down here it's got the e-mail address and I can I can make sense of some
of this stuff.
Really there is I know that this S-G is like around my SGV dot net.
This is actually my server itself and I can see that it's the authentication results.
The SPF is neutral.
If I had an a Sender Policy Framework set up inside of the domain it might say pass for giving permission.
And that would be better than just having it neutral it's neutral.
Let's say it's neither this this IP address which is where my e-mail was sent from is neither permitted
nor denied by this domain which is my part of my name server and the server that I own at site Ground
as a part of my hosting account.
And this is my IP address.
So if somebody were to hack into my web site itself or or into my email and start to spoof this IP address
it wouldn't be blocked or anything like that because it's not permitted nor denied for any domain name
and I could get my IP address or my server name here banned from sending email.
And so I can see that that's just coming directly from from site ground and I don't actually have a
S-M T.P. server set up.
It's actually using the PH P mailer which is the default setting for wordpress.
Now a best practice is to set up so that you're using an s team PC as a.p server and that it is identified
and authenticated using some method the initial method is SPF and depends on what type of S-M T.P. server
you using.
But anything is better than just the default settings here especially on shared servers where somebody
might be sharing the IP address with you and you don't know whether they're protecting their email and
their IP address or not.
So we're going to just close that back up and we'll go back to the Web site and I'm going to go ahead
and log in to my Greg Davis dot com WordPress dashboard once again and look at my installed plug ins.
And this is what I'll have you do.
Go ahead and open up your Wordpress dashboard add the postman plug in.
If you haven't done that yet and I'm going to go down and just activate my post man as I'm T.P. plug
in I click activate and follow along and do the same thing.
Now it says postman is not configured and it's mimicking out-of-the-box WordPress email delivery.
I'm sure that right now if I did an e-mail either from the contact form or from the forgotten password
system it would show up similarly just using the HP mailer that comes by default installed inside of
WordPress.
So the first thing we'll do which will be possibly one of the most common setups is to set up Google's
Gmail as your S-M T.P. server especially for clients that use Gmail already they would have to have
a valid gmail account or a valid Google account which is free and easy to come by and you can use Google's
SATB server for free as long as you have a Google account and a Gmail.
And so what I'll do is go under settings and go into the post man as anti-peace settings.
Another thing that you'll find useful is if you go under WordPress dot org and under plug ins search
plug ins for the post man some T.P. plug in.
And if you go down here you can read a little bit about it but if you go to FNQ that's the frequently
asked questions.
There is a great little set of instructions and a video about setting up the Google SSTV server in post
man and I followed these with great success to set up Google as my SMTP server and I'll have you do
the same thing.
If you don't already go to Google dot com and get yourself a G-mail e-mail address it's easy and free
to do this kind of set up for yourself.
So I'll go back to Greg Davis dot com and I'm going to go ahead and start the wizard.
This is an easy way to set up configuration using postman S-M T.P. and the email for me in Google is
going to be my gmail address which is different than the address that my browser thinks that I have.
So I'll just put that e-mail address in there and again follow along with your own Gmail account pause
the video if you need to to get it set up.
Now at gmail the man plug it knows that it's S-M T.P. dot gmail dot com.
So since that's correct I'll just click next and now it is checking to see what the G-mail provider
offers and what the Wordpress host allows.
This has some dependencies on whether your host is strong enough to use it.
But what we're going to be doing is what it recommends to get overthe 2.0 authentication which is one
of the best is to use Gmail on port 587.
So let's go ahead and do that with the off 2.0 selected and I'll just hit next and now here's where
I have to have a little bit of setup I need to set up a client id for a web application.
And that's where I got that information from WordPress dot org right here and I used the this link to
the Google developer's console and I set that up following these instructions.
So go ahead and do that.
Now I'm going to need to put in a Client ID and a client secret so that I don't have to store my e-mail
password in the Wordpress database and I can authorize Google to be my email sender from WordPress for
transactional emails.
And so by going back to here and opening the Google developers con. I've got a tab open in my browser
here where you can see I've got the console dot developers dot Google dot com Web site open and I am
logged in with my profile which is that same email address.
The gmail address that I have at Google that I had set up inside of post man.
And so with this open I followed those instructions and if I click credentials right here you can see
that I've set up I've set up a client ID.
And I just named it post man as a.p so that I would know what it's called and I could refer to it later.
And so I have a client id and a client secret here.
So if I just hit Control C and I hope you're following along and doing the same thing by pausing the
video now I need a client secret from this oh off 2.0 client right here and then see I click client
secret Control-C to copy and back at my web site control the.
And now if I just hit next it says I'm done.
When I hit finish it'll save the settings and then I grant permission with the email provider for postman
to send send email.
So I'll finish right here I don't need my browser.
OK so now I have a little red line over here and I've configured it but I have not received permission
to use it from google yet.
So if I just click the grant permission as long as I'm logged in with my gmail account it asks me if
I would like to allow Google to use Gmail to send with the Greg Davis dot com domain name.
And so even if you're using a temporary domain at your live server this will still work using a temporary
domain.
And so I'll just click allow right now and it navigates right back and it says the 2.00 the off 2.00
authorization was successful and it's ready to send email.
And it says postman is configured.
Now you can use the send a test mail link or we can do that same thing you know all I'm going to do
is log out of Wordpress I'm going to go to the last your password and again I'm just going to choose
my username and click get new password.
This will generate that email again and this time when that e-mail goes to my email client my email
program will look at the source code and see what the differences are.
So I've gone into my email program again and I opened the email that was sent from WordPress this time.
You can see that the From address is actually different the from address is my gmail account.
So I know that that post man S.M. T.P. setting that I made just now is working.
And let's take a look at the view sourceless take a look at the source code above the e-mail content.
First of all the first thing I notice is that there is a DKIM signature there's some signature and authentication
messages right here inside of the header.
And you can see that if I look at the authentication results I'm getting some different places that
e-mail is coming from.
I can see there's a different IP address the SPF results are pass instead of that neutral that I had
in the last e-mail.
Now the From address is my gmail address and so potentially you or your client might want to set up
a special gmail address for your business rather than using a client's personal Gmail address.
If they do have one so you can see that you know it's been the same Tepes been from Google dot com.
There's a DKIM authentication which is another secondary authentication.
On top of SPF another layer of authentication and that one also gives us a message of past.
So that is a really good email setup.
If I look also over here you know the authentication results and it's received from a different IP address
than my own.
This is actually an IP address at Google dot com.
And because we trust Google to map to manage their email sending We're using their SMPTE server because
it is excellent.
Oh great.
And the X male areas from this actual plug in.
And that's fine to have that inside of my e-mail header.
And again I just get the same message that I got before someone's requested a password reset if I don't
click that password reset.
I don't have to change my password.
I'm just testing the e-mail headers.
So we've successfully set up Google to send our e-mail for us from our WordPress Web site.
Congratulations.
In this lesson you use the word Bresse Web site at your live server to set up transactional e-mail sending
through an external EQ as a.p server.
You set it up using a Google account and a gmail address so that your WordPress website can send email
in an upgraded fashion in the next video.
We use another even more powerful e-mail server to send transactional email through our WordPress system
while Google lets you send up to ninety nine emails per day with their free servers send grids free
account.
Limits are much higher allowing 1000 emails a day for the first week and going up from there.
They allow 12000 emails a month with their free level