<HTML ><HEAD ><TITLE >Obfuscating E-mail Addresses</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Smarty Manual" HREF="index.html"><LINK REL="UP" TITLE="Tips & Tricks" HREF="tips.html"><LINK REL="PREVIOUS" TITLE="Componentized Templates" HREF="tips.componentized.templates.html"><LINK REL="NEXT" TITLE="Resources" HREF="resources.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Smarty Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="tips.componentized.templates.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 18. Tips & Tricks</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="resources.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="tips.obfuscating.email" ></A >Obfuscating E-mail Addresses</H1 ><P > Do you ever wonder how your email address gets on so many spam mailing lists? One way spammers collect email addresses is from web pages. To help combat this problem, you can make your email address show up in scrambled javascript in the HTML source, yet it it will look and work correctly in the browser. This is done with the <A HREF="language.function.mailto.html" > <TT CLASS="varname" >{mailto}</TT ></A > plugin. </P ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN7713" ></A ><P ><B >Example 18-8. Example of template the Obfuscating an email address</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><PRE CLASS="programlisting" ><div id="contact">Send inquiries to {mailto address=$EmailAddress encode='javascript' subject='Hello'} </div></PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Technical Note: </B > This method isn't 100% foolproof. A spammer could conceivably program his e-mail collector to decode these values, but not likely.... hopefully..yet ... wheres that quantum computer :-?. </P ></BLOCKQUOTE ></DIV ><P > See also <A HREF="language.modifier.escape.html" ><TT CLASS="varname" >escape</TT ></A > modifier and <A HREF="language.function.mailto.html" ><TT CLASS="varname" >{mailto}</TT ></A >. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="tips.componentized.templates.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="resources.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Componentized Templates</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="tips.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Resources</TD ></TR ></TABLE ></DIV ></BODY ></HTML >