Hey there, welcome to WPBbeginner and thanks for tuning in. In this video I'm gonna
show you how you can fix the WordPress not sending emails issue. If you use a
form on your site, say like gravity forms or WPForms then you need to rely
on your website for sending emails and a lot of times if your site isn't sending
emails it's because you're hosting provider they don't have the PHP mail
function turned on on the server and that's ok we actually recommend that you
use SMTP for sending email that is the Simple Mail Transfer Protocol and its the
industry standard for sending emails. To get that going on your site
I'm gonna walk you through in this video how to set up a mail gun account and how to
connect that to your website so that you know that your emails are getting sent
on your website. So the first thing we want to do is we wanna go ahead and go to mailgun and we want
to sign up. The service is quite affordable the first 10,000 emails a
month are free. So I'm going to go ahead and create an account real quick and then we'll move on.
Once you create an account you're
gonna see this area and you want to just scroll down because we're gonna add your domain
here. I'm gonna click add domain from here we need to add a subdomain. We'll create the
subdomain on our website host platform so I'm gonna keep this open. We're going to create
the subdomain and that's going to be on our own hosting site so what we need to
do is go ahead and keep this page open but we need to go to our hosting account.
Log-in to the cPanel and we're going to scroll down and we're looking for the
subdomains area. From here I'm gonna click on the subdomains because I want to create
one. You can see this is the one I want to use if you have multiple domains you
wanna pick the one that you want to use this for and I'm gonna type mail1 so it's basically going to
be mail1.mydomain. Alright, now that we created that I'm gonna copy that
information, go back to mailgun, I want to add that subdomain here and then click add domain.
Okay, now we need to go through and do some verification. What it's saying here's you
need to go the DNS provider so again you need to go back to your hosting
account go to the home area
and this time we want to go on to advanced DNS zone area to set this up.
There are two records that we want to enter. This text one and this text one so we want to
enter this value and this information on our advanced DNS area. Okay, so first thing I'm gonna
do is copy this info, add it into the name area the time to live we're gonna put the default
14400 this is a text type, and the address I'm gonna come over back over here
copy that value add it here and add record.
Alright, successfully added we can see it down here
need to do the same thing for the other one.
Can copy this information, add that to the name area.
I'm gonna grab this whole piece add it to the address
time to live here is the default, the type is text based and then I'll paste that data there and I want to add
that record as well. Alright that one was added successfully as well right now that
I've entered that I need to go back to my cpanel homepage and I need to make
an entry. I'm looking for the MX record entry because I need to make an MX
entry. From here and choose the root domain and I want to add what I see here so
it's a ten priority and this value so do ten, destination will be that, add the new
record. Alright now we've added everything that we need to to the hosting side so
now we need to go to our actual WordPress website
go ahead and log-in. Under plugins we want to add new and we're searching for the plugin called
mailgun for WordPress. I'll hit enter, and this is the one we want from mailgun so we'll install now
and we want to activate it alright once it's
activated you need to go into settings and we want to go ahead and set all of this up.
Yeah we want to use the HTTP API setting that's the default and that's perfect for
what we're doing.
The mailgun domain name you want to go over to your mailgun site and copy this
domain up here.
put that there, and then you also wanna grab your API key from your mailgun site
put that here here you can decide if
you want to choose to track your clicks and the open rates of the emails can also add a
tag for further tracking and analytics and then here's a short code for later.
But we want to just save these settings and then we want to test configuration make
sure everything looks ok you and now that we have a success and with that we fix the issue of not
being able to send emails from our WordPress 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