 I'll start so All right, so this is going to be a talk about sending email from your website and this isn't like sending mail in the aspect of This is more like contact forms or automated emails that are sent out through WordPress I'll go through the technical background What's going on how it works how it used to work and why why we have problems getting stuff in your inbox I'm going to talk about DNS the domain name system because that's a big part of it Then I'm going to talk about the actual problem, and then I'll talk about plugins and solutions Then we'll do some some Q&A I am I've been doing WordPress for a very long time at this point I first installed WordPress in 2005 and have a little blog for a little bit And then started doing development around 2008 I now don't do as much development as I used to I have a small agency so called clockwork WP and You will see a lot of sideways eight things that are in this talk And that's my old agency. I have screenshots from this that sideways eight is my previous Agency, and I just happen to wear this shirt because it's cozy but And then also I'm a work camp organizer with Micah and Daniel who's around here somewhere We have that coming up in hopefully in October, so save the date and Then this talk I also have it on YouTube Just YouTube comms and then a rhyman just Aaron rhyman if you Google Aaron rhyman It probably will show up in in YouTube, but I had this talk on there, too So if you need what was that guy talking about whatever you can go back and watch it again, and this will probably be on WordPress TV also when we're when we're done. It's just sometimes that doesn't happen So I figured I'll throw it on on YouTube And like I said, I'm gonna go through and explain it because I like people to understand what the actual problem is as opposed to just slapping a plug-in and calling it, you know Here's here's how we fix it. We don't know what the problem is But this is you know, here's here's the solution. I like to walk you guys through it It's gonna be a little boring But I think it's I think it's worth it. So In the 1990s which it's a long time ago This is this is how it used to work when someone would go to your website and fill out a form The sending server would say hello, and it literally Sends a hello command to wake up the server on the other end And says I have an email for you for Bob At your company comm and it responds and says great send it The sending server says here you go. My job's done and the receiving server says I got it It's a little different now Now when you fill out a form on a website the sending server says hello, I have an email The receiving server says oh your company comm. Let me go check the DNS records and see if you're allowed to send mail For this domain and if you're not set up to receive that email, it's going to be rejected That's why things are flagged as spam in google apps and other other filters but for As far as the website it looks like it's sent because it did the send command and it sent the email It just wasn't received. So the contact form looks like You know someone fills out the form they think oh they're going to receive the message that I sent but it's like Maybe um, maybe not. Um, and that's that's the crux of the problem here. So So what is dns? uh dns is domain name system and anytime you try to go to cnn.com or foxnews.com or wherever you go Your browser if you type in like let's just say clockwork. WP you type that in your Your computer looks and connects to a domain name server and says Here's the ip address for clockwork. WP Pull that up It's very similar to a phone book with a phone book if you're trying to get in touch with me you would You know erin rhyman. So you'd go to the r's find erin and there's the phone number and then you would dial Very similar when it comes to dns. So that's simple Explanation of dns. Dns can be extremely complex. There's All of these things that are dns that I actually rarely touch. The ones that are Red or and bolded are ones that I have used in the past and the ones that are in red are the ones that I use regularly And in this case for if you're going to be setting up Some of the plugins that I recommend in this Or if you use sin grid or mail gun, these are some of the records that you're going to have to edit You're going to have to edit your c name Maybe create an imx record and set up a txt record, but the tools that I recommend they all walk you through that So it's it's really cool And really simple. It only takes about 10 minutes if you have all the logins to everything you need to log into But it's it's a pretty simple process. Once you've done it once it's a little little confusing at the beginning What are imx records? They are mail exchange records. Let me drink some water and I think this uh this screenshot still applies here, um, but uh Basically it is any anytime you send a mail when you send mail to someone It looks up. What are the imx records meaning? Where should that email be going? And it's basically public information so you can go to imx toolbox and just type in where is Where is this email hosted and I use I use this tool somewhat regularly when a client has has an issue Say we're not getting your mail or whatever. You know the first thing is okay Well, I can use imx toolbox to look up and say okay. Well, where are Where is the email supposed to be going and that's kind of the first step? Where is it going and then you figure out? Okay, is it google apps that's blocking it or or whatnot So what happens when you're sending mail from a web server? In This case I have a animated gif and it's gif not gif But uh Because I'm because I'm old and that's what we used to call it in the 90s So I have an animated gif here where I'm sshing which is a way to log in to a server I'm sshing in and I'm running this command mail Um And basically I put the subject in who it's going to put the message in and I hit control d To send the mail so you I can ssh into a server log in and send mail It's not as good as using something like Uh an email client, but that is a way to send mail and that's exactly What tool is used when you are filling out a form on a website? um So this email that I logged into my dad's website, it's no longer hosted there So I don't mind showing ip addresses and in whatnot here But this when I hit send here, this is what it looks like um On in gmail it was sent on an a2 web server, which is totally fine I've had I've had a server on a2 since 2006 So I'm trying to set a record probably for a hosting client there But when When you send it it looks Kind of weird because it's even though it was set at jim rhyman dot com The web server is not really set up to send this mail properly So it's getting you know this a2 s 37 And google's like This looks like spam so it was flagged as spam it went into the spam folder Because it's not It it went through the right channels But it's not it doesn't have all the markers basically to for it to be seen as valid email so That is pretty much what happens when you fill out the form and The a2 s 37 dot a2 hosting dot com, you know, it's it doesn't have a d mark. It doesn't have D kim records it doesn't have all it's basically not set up to send mail So it it's going to be it's going to be setting up Throwing errors basically and seen as spam We could go into where I have my dns and put in The a2 s 37 blah blah blah in here and your txt your txt record your spf record If you guys are familiar with that But that's one way to do it, but if I ever move the site from a2 to something else I would have to update that it's kind of a pain in the butt so How does work press send mail and I'm telling you guys a lot of information just so you can understand that the ssh thing that I just did where I logged into the server the animated gif in there is the same thing as here When you fill out a form because if you look online for 15 Um when the mail function is called within wordpress it says right there it has a comment it says It's set to use php's mail function And what does php do so wordpress passes it to php And php actually passes it to command line tool to send that mail So i'm showing that it's the exact same way Sshing in is the same as sending a form on the website It's just you're doing it use through a web browser whereas in my example. I ssh in to do it It's not a great way to deliver mail And on my servers, I don't even install mail Because 99 of the time when my sites are hacked They're all they're trying to do is become a relay an email relay relay server And so I don't even give them the opportunity so if they were to hack into my server It's not they're not going to be able to send any mail. This is actually just my local machine But I was just just showing I just don't install mail So why do you need a solution? My mail might not be installed on the server And things like wp engine they they send mail, but they have a Um an unknown number of email that they allow to be relayed through their server I don't know what that number is someone at wp engine does but if I had 10 10 People on on that server and they were all filling out forms Eventually they could hit that whatever that number is and the mail wouldn't even send at all So it's important to have something To to fall back on Mail from a web server might not be or might be seen as spam The dns is probably not set up to accept mail from the web server because we don't set them up that way And what if a web server changes name servers of the ip addresses? How do we how do we do this? Well We do that. Um, we have a couple different options. We could ignore it and actually have one client I had this conversation with them and they were like We don't care And I said why not they said well, we use hubspot for all the forms So it's using the the hubspot api And and I said well, what about Password resets if someone needs to log into the site They're like They'll just send me an email saying I can't get in and I'll reset the email and I said Okay, then the problem solved for you You don't have to worry about it because they literally don't send contact forms In by using hubspot. It's not sending mail. It's using their api to send it So it's not sending mail at all But I would say 99 of the people aren't in that boat and they need some kind of solution So what's the solution use a plugin to do it and use either? I'm a big fan of sin grid or mail gun and I'll give you a couple screenshots Kind of just showing you why why I like them and I recommend both of them. Just look at the prices on them Sin grid can be free Which is which is awesome if you have if you send less than a hundred emails a day, it's free And if your website is sending more than a hundred emails a day You probably can afford You know to pay pay for the service if that number goes up, but I mean sin grid's really cheap In which plugin if you guys were to look at this which plugin would you install? Yeah So the one on the left Is enticing because it has two million active installs But i'm going to call them out. It's almost False advertising because it says it's the most popular smtp and email log plugin But if you want the logging part of it, you have to pay So I don't recommend that plugin And I did this talk in uh in september at word camp, uh, netherlands and One of the developers came up and talked to me afterwards. So that was that was really fun. Um, but uh You know I said I said I no issue no issue with the plugin. It works You know, it's just it's different different models the plugin that I really like is the second one here this This one, uh, it still has 300 000 active installs. I mean, that's a good solid number Not as good as two million. Um, but I'll show you why I really like this plugin If we were to click on That basically this is their this is their page here and when you install this plugin You can use smtp Gmail sin grid mail gun Whatever I either one and if one of them stops working for you, you can switch services real easy to do One of the things that's even better about it is if let's say you use sin grid and sin grid All of a sudden stop sending mail and it's giving you an error message You can set up a fallback to So you could set up an like a gmail smtp account and if account the first method fails, it'll try that If both of those fail you can Get a slack notification. Um of it. So I have a couple clients that their whole website really functions on email, uh, it's you know e-commerce They have to get notifications and stuff like that and if it stops working They need to get a notification And this is a free plugin No no cost to you and you can get slack notifications when things fail Not a bad thing for Any of your clients to have that type of setup So that way you can you can contact them proactively and say Hey your website's broken. Do you want me to fix it? You know and then charge them and and it's it's a good thing And then the last thing that you get with this plugin that I really really like is logging so if option one and two fail and slack doesn't Land in in your slack whatever And everything's complete loss and you find out a week later that everything was broken and we We have a week's worth of email that hasn't gone out You can go into it and hit send send send send send once you have it fixed. So really great plugin. I have it on 95 percent of the sites that I host because it's a it's a good good tool. Um And then when you're using that plugin You need to pair it with the service that delivers the mail and you can use mail gun or sin grid Both of them have a plugin that they don't neither of them really maintain So I I think this plugin is going to be a better Better fit. Um, but I wanted to show you guys This is when you're setting up mail gun all you have to do is set up a couple txt records a c name and two mx records I mean, I know that's intimidating for some people But that's a that's a five minute thing and you're up and running pretty quickly And one of the things now i'm going to actually going to switch over to sin grid here um The in mail gun does the the same thing here, but this is when before when you would send an email That's hysterical. I was hiding things and things moved. So I'll have to update those slides my dad. Um Anyway, this uh before when you would send an email you would have no record Like if if you're not using a third party tool like this It you once you hit send it It's sent and you have no record of it and you have no way to really test things But if you're using sin grid or mail gun It'll tell you like hey, it was sent and it was blocked and here's why it was blocked So it gives you so much information about The problem that you normally wouldn't wouldn't have if you're not using one of these services All right wrapping it up and that was probably a little faster than I expected so flew through it, but that's okay So to wrap it up don't use your host email To to send mail. It's not as efficient Or as secure in the aspect of things might get lost if you're using that use a third party tool And use either sin grid or mail gun or a service like that. There's some cheaper ones out there too I mean do do some research, but those those are the ones that I recommend And this is a really cool tool that I just happened to run into You can send an email to check-off at verifier port 25.com Send an email to that and it will respond with A lot of information about how your email is set up And I realized this week that I didn't have a DKM record for Clockwork wp.com. So I did a little youtube video five minutes and got got got that Set up, but I just didn't realize I didn't have that set up And that's a great little tool that gives you some information just a Not super related but kind of related to the topic, but I just I tend to use that regularly now. So And then that's it for me. So I Am here anybody got questions who do we have a Do we use this do we need a microphone? We do It's live I use one one or the other you don't need both. Um, and I have some clients basically um At some point one of them became Free and not free and I think I think mailgun used to be free and they did not They didn't stay free, but it's too hard to move people over So I have some clients on mailgun and in it I have It sends about 4 000 emails a A month and it only cost me three dollars or so It's not worth the time to migrate them over to save Three dollars a month, you know, so I'm just going to stay on mailgun probably for for them Um, and then the the newer clients I'm on sin grid for for the majority of them And when if you have to edit like these Piles the spf or k ins or all these things that I've heard of that's you actually go into your Wherever your dns is and you go into your dns settings Yep Yeah, so if you're going to set up mailgun and mailgun and sin grid they walk you through it like add a domain And it'll say what's the domain and then the next screen is now you need to add these records and and you just They have like copy buttons you hit copy then you paste it into your dns It's It's relatively simple. I mean it's it's tedious, but I mean it's with with the instructions It's not too bad now that they have fixed the documentation. There was a bug in the documentation before and I was I burned it's why I'm balding because because of that project, but um, yeah There's a bug in the documentation at that point, but it's fixed now So both of them are good. It's just look at the pricing and make sure that it's going to fit for for whatever Use case it is It I mean so that's to me just more of a Preference and looking professional I mean I could use erin dot rhyman at gmail.com for my business, but it doesn't look like a real business. It looks like i'm Moonlighting, um, you know as opposed to using, you know clockwork wp.com for my business So it's it's it doesn't That's more of just like a preference But I mean a lot of I do have some clients that are using their gmail account And I I tend to push them to be like just pay the six dollars a month for the for the for the gmail account It's a google workspace. It used to be called uh google for business google business suite Essentially, it's google workspace. You pay i don't know twelve dollars a month and you can be Whatever you want at your company name dot com And I really hate when clients have their email hosted at go daddy or bluehost or wherever because if If you have it through google, it's a gmail account, but it doesn't say at gmail. It says at Whatever your domain is correct. It's professional and google is not going to go down whereas I once had my Early on I had my email hosted at my Website hosting company and I didn't have work email for two weeks That is terrifying. Yeah, I I think a service and from someone that used to manage Mail servers and stuff like that. It's not to me. It's not worth the headache of having having your own Uh email. I mean unless you're just really like setting up mail servers In dealing with the headaches when it doesn't work like when it's broken It can be very hard to fix and it gets problematic to if your email's down. That's Very stressful, you know, uh, okay. So yeah, I definitely don't recommend I mean use using google apps or something like that and I I do the six dollar I don't need the 12 dollar plan. The six dollar is like Good for me. So Hmm It's six dollars for each domain or each user. I have like seven users I have a client who has they had hosting at go daddy We had to redo their website. So I hosted them Their new hosting is at site ground. So I had to move the pay records From their domain over to site ground and the reason I did that is I had to leave the mx records I had to leave their email Over at go daddy because moving all their email from go daddy would have been like nightmarish I believe and super time consuming. I said, you know, just keep paying go daddy. Leave your email there I'm not going to touch the whole domain name setting all the dns Just I'm going to point the a records Oh to site ground which gave us the website at site ground And it just these different records can be very confusing Anyone else have any questions? Oh go ahead. So To answer the question that you had earlier before on the Where to change the spf efforts? That's through your dns provider go daddy Whatever not through your actual It's your domain Registrar your domain Because that's where they tell everything to point wherever it's going to point. Yes. So just to clarify that one The question I had for Aaron is If you're using something like send grant where their business model is entirely entirely around sending emails for you In a supposedly secure fashion What stops someone else from signing up? Their own account and sending emails as Someone else at clockwork So when when that's where you put the txt records in there That it's basically showing ownership of the domain through through the txt records that you put in there There's a couple different records that So you'll do an spf Then the dkm record in there. So that's that's what's stopping you from that's how it's verified through that Does that make sense? I'm not I'm not 100% sure if I'm following I apologize Sure. Yeah, if you pass the Wherever you have registered your domain at whether it is we'd not necessarily have to be where it's hosted But if you whatever company is controlling your dns records, whether it's cloud player Whether it's the registrar that you bought your domain from or whether it's your host That's where you put that record Yeah, but like I guess I just think I guess his question is where you pointed the Your wordpress website to send to send and make sure that that bridge is so so when you so you go into um You go in here and when you select syngrid or mailgun It'll ask you at that point for your api key from syngrid and then from syngrid when you when you send an email it passes that api key And that shows that it's verified and then that's how it gets triggered. Does that answer? May maybe All right, I apologize um, I think Yeah in the back And I can talk to you later too So apologize not following So a lot of the email sending that you've been talking about is primarily for transactional emails from your website. Correct What about can you discuss a little bit about having emails? Regular emails like if I want to send something to you coming from my website as opposed to using Google workspace or something so that I can ensure the deliverability is better than Just when I sign up for something How would you send a mail in an email though through your website? I'm not within cPanel. I can set up email accounts. Okay, and then the hosting account is Then sending them out Basically that would that would make it an smtp Um email account, right? Yes. Okay in that in that case you can The one that's selected right there you can tell it to use smtp Um, and then it'll ask you for the username and the password And the mail server so, you know, whatever your domain is or whatever the mail is going to and you can drop it in there And you can use cPanel to send the mail The the thing that you you'll lose in if you're using that and there's not like there's anything wrong with that Until it doesn't work you know You won't have the ability to go through the This this type of screen that gives you that type of information the logging why it why it failed So it's I mean using going using your smtp through cPanel is a much better solution than Not doing anything at all and just doing the default wordpress. So I mean that that's a fine. I mean it's a it's a Using smtp. It's a good way to do it. It's not the best way, but it's definitely better than doing nothing So, um, but but that would work and in in in that case there's no cost too I mean if you're already paying for for that, uh through smtp through your cPanel account, there's no cost to you so Okay, thank you. Yep Micah, do you don't have questions? Just say one thing There's a lot of posts will use a viral And that will have edit a console to call smtp block that's usually turned on by default that stops spam Your host you could do it if you if you're comfortable doing it You could open and take with your host say, please enable this cPanel account Yeah, and I know nothing about cPanel anymore. I'm I haven't Really touched cPanel probably in about six or seven years. So thank you To your point there, you don't know what happens, but depending on if you're on a share hosting you have your own bps If you have your own bps, you have good access to mail log and chat Share hosting you should be able to take it and they can check the mail logs and see where did this problem occur But if you're not comfortable doing that or you don't want that hassle with the api So it should work really well. Yeah Cool. Any other questions? All right. Well, thank you very much. I appreciate it. I'll be I'll be around if you have questions Feel free to talk talk to me. Thank you