mailto enabling emailing on your web site

mailto enabling emailing on your web site cover image
  1. Home
  2. HTML
  3. mailto enabling emailing on your web site

The anchor <a> tag can also be used for enabling emailing, which helps visitors to send feedback through your web site. This is all fine and dandy as long as the visitor has his email client configured to send emails. However, if this is not the case, his computer will inform the him about it and the email will not be sent till an email client is configured.

Using the mailto value along with an email address in the HREF attribute of the anchor tag will create a link, which when clicked will open the default email client.

<a HREF="mailto:manish@simplygraphix.com">
Send me your feedback on this tutorial</a>

Sponsored Links

This will be displayed as:
Send me your feedback on this tutorial

Click on the above link. If you have configured an email client such as Microsoft’s Outlook Express or Netscape Messenger, the program will open and you shall be able to send me an email.

Simple and neat, huh?

More information on the HTML mailto

The mailto attribute is a neat way to accept visitor feedback. You just need to insert a bit of HTML code with the email address to which messages will be delivered.

However, there are a few disadvantages. Firstly, mailto assumes that the visitor has configured at least one address on the default email program on his computer. Secondly, mailto is limited in scope. You can’t get formatted replies. Thus, it provides no option for you to specifically ask visitors for their name, email address, company name, telephone numbers etc. You can just provide pointers – how the message is written by the visitor is entirely up to them.

For details on the HTML mailto attribute, you should read The HTML mailto – HTML tips.

HTML