 You're all here probably because you've experienced problems with not receiving emails or ending up in the spam box. How can you make your contact form this way so everyone can receive your emails? I have a solution or two. Alright, so I'm going to go through a couple different things. I'm going to give you guys a technical background, kind of like what the problem is, why it exists and what's causing it. I'm going to touch on DNS and what the problem is. I'm going to show you guys a plugin that I recommend and some solutions. Then we'll do some Q&A. Like she said, father or four with my wife in the back there. We turned this into kind of a vacation slash work thing. So we're going to spend a couple days after this in Utrecht and then see Amsterdam and what not. So that's going to be fun. From Atlanta, Georgia, I've been doing web developments more than half my life now, which is not a thing, but that's scary. I've been doing that since I was 19. I built my first website when I was 19 and was at 96. So literally using edit.com, which is a DOS tool where you can edit. Those before good text editors, VI existed, but nonetheless. I've been doing this stuff for a long time and this problem has existed ever since. I run an agency called Clockwork WP. I also owned an agency for nine years and sold it and then spun off the hosting side of the business to Clockwork. Clockwork has now become more of a just average agency. We're really small, but we do good work. I'm a WordPress organizer of the work camp Atlanta and we unfortunately because of COVID had to cancel the last one and then haven't been able to figure out a way to do another work camp in Atlanta. But we'll get there eventually, hopefully. And then I do the Atlanta meetup also. First, I love the fact that you guys can pronounce my name, my last name. Everywhere I go in the world, I get reman. And I will say thank you for not making me do this in Dutch because I'm limited to sentences like the girl eats bread or the boy runs. Things like that, real basic. So thank you for letting me do this in English. So I'm going to show you guys, like I said, I'm going to explain what the problem is and how to fix it. But I think it's important to know what the problem is, not just here's the plugin you use. Everyone has a site where there's too many plugins and stuff like that. You don't just want to add them just because. And so I'll kind of give you what the issue is and how WordPress works, basically. And way back when back in the 90s, when you would fill out the contact form, it would do something like this. I'm just going to kind of read the slide here. When you send a contact form, it triggers the sending. When it sends, it says, hey, I have an email for Bob at yourcompany.com. And the email server will say, great, I don't get much email. Not really, but back in the 90s you were excited to get email. Now nobody wants email. And then it sends. And then you get a thing that says it was received. It's a little different now when you send a mail. It now will send an email. It says I have a form that was filled out on the website for Bob at yourcompany.com. And the receiving server, your email server, whether it be Gmail or Office 365 or whatever, it'll say an email for yourcompany.com. Let me check the DNS records. And it will look and it will say, hey, I looked at the TXT record, the DNS record. And you're not allowed to send mail from the web server. So we're going to block it or we're going to flag it as spam. And you never see the email. Now, obviously the form, the person that goes to the website and is filling out the form, they'll fill it out, they'll submit, it'll say email sent. Great, but it's sent. That doesn't mean it was really delivered. It just ran the send command to send the mail. And that's the problem. I mean, how many of you guys have run into the problem where the client says they're not getting the email from the website? Raise your hand. Yeah, okay, that's why you're here. So it's a constant problem. I host about 200 websites and I have all of them where they have some kind of solution implemented. And even though, even if you have a plugin that triggers, that sends the email, it still can be problematic and a headache. So what is DNS? How many of you guys raise your hand if you deal with DNS regularly? Okay, yeah. I mean, I prefer Cloudflare for DNS. And I'm in Cloudflare constantly. I have to be in there at least daily, if not a couple of times a day. But DNS means domain name system. Some people say it stands for DNS server. But the DNS system runs on domain name servers. And basically, most of you guys probably remember phone books, right? I know no one uses phone books anymore. But they were these, at least in the States, these yellow books that were massive where you could, you know someone's name, you have to look up their phone. DNS is basically a glorified phone book where all you do is you type in, okay, I need to go to clockworkwp.com, your computer will in the background go connect to the DNS server, whatever that is. Probably through your ISP, your internet provider, they give you that. And it'll just say, okay, I'm looking for clockwork.com, and it'll return and say, okay, it is at this IP address, pull up, take them to this server, this IP address. So relatively simple, but that's a very simplified version of DNS. And DNS can do a lot. There are a bazillion, that's the technical term. There's probably 40 different types of DNS records. The ones that are bolded are ones that I have run into. Some of these I've never actually run into. But the ones that are in red are the ones that you'll run into regularly. And the one that's really important for this are TXT records, specifically SPF records. You guys familiar with SPF records or grant? Okay, it stands for Sending Policy Framework, I think. And it basically, it's an extended, it's kind of like a wild card. With TXT records, you can shove whatever information into a TXT record. But when you specify at the beginning of a TXT record, you'll specify that it's V equals SPF, and then I'll show you an example in a second. But the C names, NX records, and TXT records are what you need to be familiar with if you're trying to solve the problem of deliverable, sending the mail. NX records are stands for Mail Exchange Records. And every, if you have an email, you are using NX records. And my old company Sideways 8, I didn't update all my slides. But basically, Sideways 8, when you try to send an email to Sideways8.com, it'll look and say, where do we send it? Obviously, I have them all on Google Mail. And these numbers here, 10, 20, I don't know why it's in that weird order. But 10 is primary, and that's the last one. So when you send a mail to Sideways8.com, it's going to try to go to this server first. If that server's down, it'll jump to 20. If that one's down, it'll jump to that one, et cetera, et cetera. So the lower the number, the better. Those aren't NX records. And they're publicly available. So I use NX Toolbox regularly to look up information. If a client contacts me and says, hey, someone filled out the form. I didn't receive it. This is going to be the first thing I do. I go and I figure out, OK, well, where is their email hosted? Because that's going to tell me, oh, it's Google. So Google is somehow filtering the email and not allowing it to come in. My animated GIF is not working. And I said GIF because that's the correct pronunciation. But that's funny. Well, OK, cool. Now it's working. So when you send an email from the website, this is basically that run. This is what runs in the background. So you can SSH into a server and type in this mail command. Mail send at this subject, sorry, this email address and then this subject. And when you send this mail, so this is an email that's going to say, test work camp email and send to this email address. Here's the subject. This is the test. Don't send email this way. And then you hit Control-D, I think, to send the mail in its sense. When that email is sent, this is what it'll look like. Notice, I used my dad's website as the example. His name was Jim Reimann. So his username is Jim Reimann. And when you send mail, Google sees it as spam. You had this flag here saying, this doesn't look quite legit. Why is that? Well, Google does a DNS record lookup. And it was sent from an A2 server, which is in Michigan. And it looks like it comes from this A2, I'm assuming that the company's A2 hosting. So A2 server number 37. And Google looks like spam. Google sees it as spam, and so it's going to flag it. And if you look, this server A2 server 37, it doesn't have any DNS records. It doesn't have anything in here to tell me that, oh, you can also send mail to sideways8.com because there's just nothing in here. So Google's like, no, we don't like that. I could modify my SPF records, which this isn't the best way to do this. But we could drop in that A2S37.A2hosting.com or whatever that address into my SPF record, my TXT record. But what if I change the server? What if I move the server to something else? That's a thing that we don't want to do. Instead, we're going to recommend using something like Syngrid to allow mail from Syngrid. So that's kind of the problem. And WordPress basically uses that same command. So you saw when I was the animated GIF that didn't work at the beginning, that when it sends mail, you can allow it to make contact form on the website. You were basically hitting this, you run this mail function in PHP. This is WordPress's mail function in the source code. And basically it says, this is a comment right here if you don't know the two slashes. This is just a comment and it says, set to use PHP's mail. So WordPress doesn't really do anything with email. It passes it on to PHP itself. And PHP will in turn look on the server for a program called send mail. That mail where you type in mail space dash s with the subject in the email address. That's what WordPress is doing. WordPress is super smart though because it has hooks and filters where you can hook in and break things if you don't know what you're doing. But you can also, it allows you to hook in and not bypass but take over that function. So you're not dependent on your weird web server configuration. So we were allowed to hook into it. Does that make sense? All right. One more screenshot here just showing that the PHP, so when this says that PHP's mail, I'm sorry, WordPress uses PHP's mail and then PHP's mail is literally using that same command to send mail. So it just drops to the command line and sends it kind of in the background. You don't really see that that's happening when you fill out your form and hit submit but that's what all is going on in the background. Check my, all right, I'll do it good. Or well, but love for my computer to work though. I think that animated GIF is freaking it out or something. I don't know. So one of the problems, I don't use, I have all my servers on DigitalOcean. So I set them all up using InginX and MySQL and whatnot. But I never install mail on my server because anytime a server gets hacked, all they're trying to do is use it as a mail relay. So that's why I completely, I just don't install send mail on the server at all. And servers like WP Engine, as great as they are, they have mail on there but they have an article on their website saying, don't use this to send mail because it's not reliable and they recommend using a third party tool. But if you have a server and mail is not installed, it's going to look like that form was filled out and sent but there's nothing happening in the background. So, why do you need a solution? Well, mail might not be installed. Mail probably is going to look like spam and even if you have it all set up properly, it might still look like spam and you have to deal with some kind of white filter, white listing thing. Your DNS is probably not set up to, at least by default, to connect to your server. And then if you set it up where you specified the server's address, if you were to move to a different server, you'd have to make another DNS record change to fix the problem. So, what do you do? You can ignore it. I have a lot of clients that are like, well, my website never sends mail. Why do I need a solution? I'm like, have you ever forgotten your password? It's really nice to make sure that the password reset function works. Now, there are some where it's a blog where they have no comments, no reason to have email and have one client like that where it doesn't send mail, but the other 200 clients, they needed to send mail at least for the I forgot my password function. So, here's the solution, guys. So, wake up. In the world of Yoast, where Yoast is the most popular plugin, and that's the one you should use, right? I would say if there's a plugin out there, grab the most popular one because it's the best. That's not necessarily true. Yoast is super popular and there's some other plugins. This one here, this plugin for, it's called WP Mail S&TP. They have two million active installs. And by the way, the plugin that I'm going to recommend, I don't know the dude. I'm not promoting my own plugin or anything crazy like that. I kind of found this plugin and the solution by trial and error, like almost every WordPress builder out there, you just try to plug in and it works. This is the plugin I recommend, though. This one is, sorry if the person here that writes this plugin is here. But it's very nag wear. It's very limited. And now it does connect to some of the third party things out there. But if you want to log, you want to log of your email, you're going to have to pay for it. If you need a fallback, they don't have that functionality in the free version. Stuff like that. This is the one I recommend. It has 300,000 active installs and it is wonderful. Why is it wonderful, Aaron? Well, I'll tell you. It has, it's updated regularly. I just happened to take this screenshot a couple of weeks ago or so. He's maintaining it. But it allows me to connect to anything that I've ever wanted to connect to. So I can use just SMTP, so meaning SMTP, meaning I can drop in a username and password to send mail. I can also use the solutions that I recommend to all of my clients. I can use SendGrid or MailGun if I want to. Another thing that's really great about this, we can set up a fallback. So if your SendGrid or MailGun solution doesn't work, we can set it up where it'll try the second option. Just drop in the username and password and the port number and all that stuff and you're up and running. What else does it do, Aaron? Well, it does something amazing. It does Slack notification. So if you email one option doesn't work, option two fails, you can set it where it'll send a Slack message to your Slack, which is super handy because I have one client that the whole system runs on email. And if they don't, I've got it, thank you. It's, yeah, okay. Just check it. That to me is just awesome that I can get Slack notifications from it. I've gotten it once. I had the first account set up and SendGrid had freaked out and it wasn't sending and then someone had reset the password for option two and so I got a Slack notification. To me, I could almost sell that to a client and be like, yeah, well, hosting is $30 a month, but if you pay 40, we'll get you Slack notifications and I'll let you know if things break. Something like that. I'm just saying the plug-ins pretty solid. And then the last thing that the plug-in does that I think is great is it does logging for free. So, and it not just does logging, you can, if you realize that, oh, the past three days I have this log of where it failed, failed, failed, failed, failed. I can go and fix the problem and then I can go back to those emails and hit send, send, send, send, send, send, send. The client wouldn't even know that it wasn't working, if it's your fault. So that plug-in is pretty awesome. Now MailGun has their own plug-in that will get the job done where you just drop in the API key, but it doesn't do logging and it doesn't do all the other things that that plug-in does. Same with Syngrid. Syngrid has a plug-in, but it's super limited. And that's what I first started using is those two plug-ins and then I found this plug-in that I'm promoting here selflessly. And then basically to set up something like Syngrid or MailGun, it normally takes me about 15 minutes or so. If I have access to the DNS records, it takes about 15 minutes to set these up. It's going to require dropping in something real simple like include MailGun to your TXT2 records. You might have to set up a DKIM record. You set up a CNAME and two MX records and you're up and running in 15 minutes. So MailGun is relatively cheap. I have one university using it. They send out about 3,000 emails a month and it costs $3. Something really cheap. Syngrid can be free. If I remember correctly, it will send... Syngrid is free as long as you don't go over 100 emails a day, which I can't think of a website. It would have to be a very popular website to push that 100 a day limit. And another reason why to use a third party, even if you're using SNTP, just use a password to send mail, once you hit send, you have no record of anything. So it makes it really hard. I'm telling a client, I don't know, it's sending. I see it, it's sending. Good luck. That's not very helpful. Syngrid and MailGun both will go through and say... I tried to blur that out and fail. Anyway, it goes through. It says it was processed at this time and it blocked. And here's the reason why. And that to me is one of the hardest parts. I don't understand why it's not working. It just doesn't work. Having that plugin active... Yeah, having that plugin using either MailGun or Syngrid, they give you a great tool to look and see and solve the problem. And if you're a total geek, it's a great book that you can read that I read 20 years ago when you had to do this stuff super manually. I had to go and do it. That book, if you want to be a DNS expert, that's a great book to read. And here is a... I just found out about this one about a month ago. We were having DNS issues with email and I talked to a client. They said, well, talk to my IT guy. And the IT guy said, did you send an email to verifier.port25. I'm like, why would I have done that? And he said, oh, it's amazing. And you can tell... So once I have everything set up with Syngrid or MailGun, I'll send an email or get the client. This example here, this is ClockworkWP. This is me running and testing my own email. But this tool will go through. It'll tell you. It'll check your SPF record to make sure it's set up properly. It'll make sure your DKM record in it... This page continues on forever. Thank you. Yeah, I'm almost done. I got one more slide. I also have a blind spot where I can't see over here too. So I probably should have been on the other side. But that tool, I think that's a great tool. So if everybody wants to, go send an email to that just to see if I'm lying or not. That's just a great little tool that I found. And that's it.