FIGHT EMAIL SPAM! Every hour of every day, Spam-Bots [a.k.a. Email Harvester computer programs] are scouring the web looking for email addresses to add to their spam list databases. If you have a website with an (unprotected) email address on it, sooner or later, the spam-bots will find it. Your email address will be "harvested", you will be added to the spammers' lists, and your email in-box will be flooded with spam.
As you may publish not just your own email but that of other people it is important to respect their right to be protected and encode every email address presented in your web pages.
You need your email address on your website so that people can contact you. The key is to "protect" your email address by making it unreadable to the spambots, but still readable to your human visitors. The method used in PyroCMS is to "encode" the email address in a series of HTML codes. Because the Spam-Bots simply look in the source of pages for a format like someone@website.com, if the code in the page doesn't look anthing like that then most Spam-Bots will not recognise it, and will pass it by. The encoded address in the web page from PyroCMS is reassembled into a real email format in the users browser by a small piece of Javascript that runs once the page is loaded in the browser. This means the browser will read and decode the email address and display your real email address to your human visitors.
The editor includes a button that will insert the correct code into a page for you, see Page Editor "Insert protected email address". All you have to do is supply the email address. Using only the email address will display that address as the link in the public page. If you supply an additional name, then the name will be display as the email link in the public page. The system will then insert the correct code for you.
PyroCMS uses a tag code to utilise the email address, this is inserted by the editor button, but you need to recognise and understand the entry to be able to amend or delete it. The tag code syntax is very important, it uses double curly brackets like this:
{{ code here }}
The spaces inside the brackets separating them from the code must be present.
The code for an email encode is this:
{{ layout:email address="altalogix@gmail.com" name="Altalogix Inc." }}
The "layout" part invokes a module in the system called layout, and within that module, the "email" function. You then supply the email address with the address="altalogix@gmail.com". The name="Altalogix Inc." if present will display the text as the link for the email address.
In the Page Editor you can read and amend the email address easily knowing this. Either change the email address that you see or delete the entry by deleting everything from the opening "{" to the closing "}".
The system does all the work of encoding and presenting the email address correctly on the final web page. The email addresses are then protected as best as it is possible - until the bots become more intelligent of course....