Sending Emails From Website Forms

24 / 100

Sending Emails Used To Be Easy… ish

It didn’t take long as a web designer to see that having visitors complete a form and for that form to be emailed to us site owners was much more desirable than just posting a simple email address.

Creating the form was easy with some simple HTML, which would have to be sent to another script or page containing the code to connect to the email server. Once that connection was made, another script/page would have to actually push the data to the server and receive a response, and then another script would publish a thank you message. Easy… ish.

But now with WordPress there are dedicated plugins, and even themes, that have email form builders baked in. And they worked great until just a few years ago. Where’ going to talk today about those challenges, and what you can do to get around them.

History of Sending Emails

In the late 90’s and early 2000’s email was very simple. You connected with Outlook Express or Netscape Mail via port 21, had to authenticate to receive email, but not really to send.

It didn’t take long for spammers to emerge and realize all those open relays were just waiting to be exploited by pushing huge amounts of email through them without having to authenticate. So ISP’s started to lock that down by forcing passwords on SMTP, outbound, email.

That seemed to fix some of the issue for a bit, but as spammers do, they found ways to knock down that door as well forcing the ISPs and the now dedicated email services like Hotmail and Gmail to put other roadblocks in place. SSL and TLS encryption ports were implemented to make it even more difficult for spammers to push email through accounts they shouldn’t have access to.

Which is wonderful… unless you’re trying to send email from your website using your email accounts.

Services like Office365, Gmail/Google Workspaces, and others have made it increasingly difficult to use with WordPress and other websites as they’ve become more secure. The reason is, connecting to that service from an outside, or in the words of Gmail, “untrusted” third party, is turned off by default. You have to enable it and authenticate to it with usernames, passwords and maybe even API keys.

Again, this is all wonderful. Keeping your accounts and the servers safe and clean is paramount. But luckily there are some tools available to us to make sending emails from websites a little easier.

Why Send Emails From a Form?

The easiest way to send an email from a website? Publish your email in the content, have a link open up the dedicated email program on the users computer (mailto://somethingsomething@something.com) and you’re done. You can even add some pre-populated parameters like the email subject (?subject=”More something something”) , cc addresses and more.

But, publishing your email is at best an aged process, and at worst it allows that address to be scraped from the page and used to send emails to spam receivers.

Forms solve this by doing a couple of things well:

  • Hide the email “send-to” and even allow the forms to be sent to multiple people, an email list, or a certain person based on a form value.
  • Format the email in such a way that senders complete a series of fields with the right data, in a desired order, and can have certain fields be required.
  • Other information can be added to the form such as time, date, IP address, type of device used, browser, and much more.
  • Can be built to send a copy to the sender to confirm what was sent.
  • Many form builders save the entries so even if the email is undeliverable there is a record of the form and what was entered.

So the benefits of using a form are huge. But it’s not totally easy, and in some cases, not free. But I have some tools that I use on many of my sites. Some have free/low cost alternatives and many of the tools I’m listing here have affiliate links that you can use to get discounted prices, and it will throw a few bucks my way.

Tools For Sending Forms

  • SSL’s – Get an SSL certificate installed and running on your website. You can purchase a low-cost SSL from anywhere including Namecheap, or use a free alternative from Let’s Encrypt. Luckily, my dedicated server from InMotion Hosting has free AutoSSL for my cpanel accounts.
  • Akismet – This plugin comes installed on every new WordPress install. It does a pretty good job of keeping SPAM off the site and is very well priced.
  • reCaptcha – the “standard” for making sure anyone submitting a form is a real person. It can be a scambled letter code, a series of like photos to find all of the “boats” or something like that, or even one photo broken up to find all the crosswalks in it. The newest version of Catcha uses some AI to determine how real the visitor is by looking at the IP address, the type of device, how a person got to this page, etc in an effort to sort out bots from real people. Simple to set up and use, and pretty effective.
  • Gravity Forms – My favorite form builder. It’s not free, but allows a TON of options in creating, storing, and sending the form.Here’s a couple of tips I’ve picked up along the way using Gravity.
    1. Use a honeypot field. It’s a hidden field that is unseen by people, but is visible to bots. They complete the field and the form doesn’t get sent.
    2. Just learned this little tip, use conditional logic on the submit button to not send if a field is populated with certain content. In the case I just used, anyone sending a message containing HTTP will force the Submit button to disappear, making the form useless.I also use the DIVI WordPress theme. It has its own form builder which works ok for some cases, I like a little bit more flexibility and function.
  • SMTP2Go – a tool I found a year or so ago. It does a great job of sending emails instead of having to connect to Office365 or Gmail. Set up an account, get an API key for the website, install the plugin on your site, configure a few options and insert the API, and you’re sending.Compared to the headache of setting up Gmail and especially Office365 to send from a third party, this service is a game-changer. 10 out of 10 recommend!
  • Cleantalk – Another plugin that runs with an offsite service. It does some of the same things reCaptcha does in verifying people on the site before it allows them to do certain things, like sending forms.

So that’s it. A few tools, some time to set up forms on your site, and off you go! Using forms will really increase your conversions because it’s really easy to use for a visitor, and control the information you’re receiving from them. And with a little bit of work up front you can get clean, reliable data from only the people you want.

What are your thoughts on sending emails from forms instead of just putting your email on the site? Send them to me @BeBizzy on Twitter!

Previous