HTML mailto attribute

The HTML mailto is a quick way to add the facility of receiving feedback from visitor on the web site. when the visitor clicked the HTML mailto, It lanuches their email program with new email window.

Note: HTML mailto assumes that the visitor has configured an email client (Outlook Express, Netscape Messenger, Thunderbird or any other) to send emails.

The Basic form HTML mailto requires an email address.

Its looks like:

<a href=”mailto:info@openshell.in”>Feedback Form</a>

The Complex form HTML mailto by adding an email subject and the email body so that it looks a little more professional.

Its look Like:

<a href=”mailto:info@openshell.in?subject=Feedback for Openshell.in&body=Thanks for Provinding useful Tips”>Feedback Form</a>

In addition to the body and subject, we can also provide HTML mailto with CC (Carbon Copy) and BCC (Blind Carbon Copy). This, as you would have guessed, requires us to append these values to the HTML mailto attribute just like we had done for body and subject.

Its look Like:

<a href=”mailto:info@openshell.in?subject=Feedback for Openshell.in&body=Thanks for Provinding useful Tips&cc=anotheremailaddress@anotherdomain.com&bcc=onemore@anotherdomain.com”>Feedback Form</a>

HTML mailto is a quick and easy way for beginners and who don’t know server-side programming languages (such as JSP, PHP, ROR etc.) to add a link on their web site for receiving visitor feedback.

Permanent link to this article: https://blog.openshell.in/2010/12/html-mailto-attribute/

Leave a Reply

Your email address will not be published.