There may be situations where you would want to provide your email address information on the site, so the site visitor can contact you. Would it be nice if the site visitor could send you an email even if the contact form is not provided on the site? Actually, it is possible to accomplish on your WordPress site using email links.
Creating email links is very similar to a process of creating regular links. Basically, you just need to change the beginning of you link, instead of putting “http://” or “https://” in front, you would use “mailto:”. We will see some examples later in this article. Also, we will discuss some pros and cons of using email links on your site.
Advantages of using email links
Even though email links might look very identical to regular links, there is still a difference in how they work. While a regular link redirects you to another page, an email link allows your site visitors to open a default mail client installed on their device. So, they can simply contact you using their mail client which will be opened automatically after a click.
In this case, there is no need to have any forms on the site. It is all done automatically by the visitor’s device. As a result, it helps to simplify the functionality of your site. Also, it saves your time because there is no need to develop, maintain or/and configure the contact form on your site. This is a huge advantage of using email links.
Disadvantages of using email links
There is also a huge disadvantage of using this type of link on the site. You can get lots of junk emails. Why? Once your email is posted on the site, it becomes publicly visible. Spammers often use scraping bots to harvest sites for email addresses. This is the reason why you may see an increase in spam after posting an email link.
Another disadvantage is that the site visitors need to have a working email client installed on their device/computer. Also, it forces the site visitors to wait until the email client is loaded in order to send you an email. Nobody likes to wait.
Protecting email links from scraping bots
You can combat scraping bots by using special WordPress plugins. These plugins come with a functionality that encodes email addresses added to the site. Of course these plugins will not provide 100% protection from spammers since they are adjusting all the time. So, effectiveness of those plugins are not guaranteed.
- Email Encoder: provides a full site protection for your email addresses from spam-bots, email harvesters and other robots by using different encoding methods.
- Email Address Encoder: protects plain email addresses and mailto links from email-harvesting robots, by encoding them into decimal and hexadecimal entities.
Some people find these plugins useful. You can test them yourself to find out which one works best for you.
Creating email address links
As it was mentioned previously, the process of adding this type of links is almost the same as adding other links in WordPress.
- Open your page or post where you want to have an email link.
- Select the text you want to be linked. It can be the actual email address or it might be a more general text, such as ‘Click here to contact us’.
- Enter mailto: followed by the email address. Note, there should be no spaces whatsoever and as with all email addresses.
- Click the Apply button (the arrow icon).
- Publish or Update your post or page when you are ready.
You can also pre-populate the email with some additional text using special variables. Here is a list of the variables you can use in mailto links:
|&cc=||set the CC recipient(s)|
|&bcc=||set the BCC recipient(s)|
|&subject=||set the email subject|
|&body=||set the body of the message|
Some examples of using the mailto link
#1: Here is an example of using a regular email link:
<a href="mailto:email@example.com">contact me</a>
#2: Here is an example of using an email link with a custom subject line:
<a href="mailto:firstname.lastname@example.org?subject=Product%20Questions">Questions regarding the product</a>
It is probably okay to use spaces in the subject but to be sure, you can replace spaces with “%20” to avoid any unexpected issues.
#3: Here is an example of using an email link with CC and BCC recipients:
<a href="mailto:email@example.comfirstname.lastname@example.org, email@example.comfirstname.lastname@example.org">Email Us</a
Note, you can add multiple values to CC and BCC by comma separating them.
#4: Here is an example of using an email link with a custom body text:
<a href="mailto:email@example.com?body=I%20have%20a%20project%20for%20you.">Let's discuss your project</a>