Bringing e-mails


  1. HTML mailto attribute
  2. A more complex HTML mailto
  3. Advantages of HTML mailto attribute
  4. Useful Tips

HTML mailto attribute

The mailto is a quick way to add the facility of receiving feedback from visitor on your web site.

With the HTML mailto, you create a link which when clicked by the visitor launches (if it's not already running) their email program with a new email message window.

The visitor could then formulate the email message and send it off to you.

Note: HTML mailto assumes that the visitor has configured an email client (Yahoo Mail, GMail or any other) to send emails.

In its simplest form, the HTML mailto requires an email address. However, mailto can be made slightly more professional if we use it properly.

In its bare form a mailto looks like:

        <a href="mailto:manish@simplygraphix.com">Send me an email</a>
      

And this is displayed as

Send me an email

When you click on the above link, your default email client will be launched (if you've configured one).

You'll notice that the Subject and Body fields of the email message are empty.


A more complex HTML mailto

We will now learn how to create a more complex HTML mailto by adding:

An email subject

An email body

CC (Carbon Copy)

BCC (Blind Carbon Copy)

This, as you would have guessed, requires us to append these values to the HTML mailto attribute.

        <a href="mailto:manish@simplygraphix.com?subject=Feedback for 
        webdevelopersnotes.com&body=The Tips and Tricks section is great
        &cc=anotheremailaddress@anotherdomain.com
        &bcc=onemore@anotherdomain.com">Send me an email</a>
      
Send me an email


Advantages of HTML mailto attribute

HTML mailto is a quick and easy way for non programmers beginners to add a link on their web site for receiving visitor feedback.

By the way, you can be more intuitive with HTML mailto.

For example, you can use it to create "Tell a friend" or "Send this page to a friend" kind of links on your web site.

For your convenience, here is the code and the link.

        <a href="mailto:?subject=Check out www.webdevelopersnotes.com
        &body=Hi, check out this great web site">
        Send this page to a friend</a>
      
Send this page to a friend


Useful Tips

E-mail addresses in your blog or web page are no secret to spam robots.

Here are two very simple tips that should help you protect your email addresses from these spam spiders.

Replace the AT (@) and DOT (.) symbols:

The most common approach to block email harvesting is to remove the @ symbol.

If you eliminate the @ from email addresses then most spambots won't be able to recognize that text as an email address.

Here are some examples:


Mask your email with tags, append meaningful words:

Consider "masking" your email address.

Masking involves putting a word or phrase in your email address so that it will trick a harvesting computer program, but not a person.

Some email masking examples commonly employed by newsgroups and mailing list subscribers:

Also known as email address munging - changing your real e-mail address in a way that will make it unavailable for harvesting.