Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

Encrypt Emails in WordPress with Cryptx

Last updated on by
Elegant Themes
Encrypt Emails in WordPress with Cryptx

All of us hate getting spammed, and if you haven’t already you should make sure to read about 12 Vital Tips and Tools to Combat Comment Spam in WordPress. As annoying as comment spam is though, its nothing compared to email spam. In spite of being illegal, spammers will try their best to get your email address and send you emails without your permission. One of the ways they do this is by using bots to crawl through your blog and look for email addresses. There are several ways to protect yourself against this and one method is to use a plugin. We suggest using the Cryptx Plugin for WordPress. It is easily configurable and has several options that allow you to encrypt your emails effectively. To get started go ahead and download Cryptx.

Once you have activated the plugin you should see a label for “Cryptx” under the settings tab in your WordPress dashboard. If you click on this you will be shown a screen with several options. Under the “Presentation” tab you can choose custom characters for the “@” sign and the “.” in your email addresses, have your text scrambled by AntiSpamBot, or convert your email to a PNG image.

Cryptx Plugin for WordPress

After you have selected an option scroll down and choose where you want Cryptx to be active in your blog. Also, make sure to select whether you want to use javascript or Unicode encryption. And last but not least you may want to make use of the feature that allows you to add “mailto” to all of your unlinked emails.

Cryptx for WordPress

You can also use Cryptx in your templates by including the following function:

<?php
     $mail="name@example.com";
     $text="Contact";
     $css ="email";
     if (function_exists('cryptx')) {
         cryptx($mail, $text, $css, 1);
     } else {
         echo sprintf('<a href="mailto:%s" class="%s">%s</a>', $mail, $css, ($text != "" ? $text : $mail));
     }
?> 

Make sure to replace the paramaters with your own values. $mail should be obvious but $text is the link text and $css is a class added to the link.

Download Cryptx Plugin for WordPress
.


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.