MailTo HTML syntax with email address encoding to reduce spam

  • Single email mailto example
    • <a href="">
  • mailto with Multiple email addresses/Recipients
    • <a href=",">
  • mailto with email and Subject
    • <a href=" is my email Subject">
  • mailto with a Copy To email address
    • <a href="">
  • mailto with a Blind Copy To email address
    • <a href="">
  • mailto with default Message body
    • <a href=" is the email body, start typing !">
  • add line breaks to message body - use %0A
    • <a href=" body line 1.%0AMessage body line 2.%0AMessage body line 3.">    

Complete mailto example with Subject, a Recipient, a Copy, a Blind Copy and message Body

<a href=" Subject&body=Here is the email body, start typing !">

TIP: The best way to prevent spam is to create a contact us form and have the server email based on say department or some kind of selection.

Use JavaScript to make it invisible to spambots, here is an example

<script language=JavaScript><!-- 
document.write("<a hre" + "f=ma" + "ilto:" + 
    "as400" + "sample" + "code" + 
    "@" + "blogspot." + "com" + ">" + 
    "Click here to email !" + "</a>"); 
//--> </script>

No comments:

Post a Comment

NO JUNK, Please try to keep this clean and related to the topic at hand.
Comments are for users to ask questions, collaborate or improve on existing.