Monday, 19 January 2015

How to use mailto syntax? Complete tutorial with example

Today we are with a complete variety of article. This article helps webmasters and developers to create mailto links on your webpages. Actually mailto syntax is a protocol like HTTP, HTTPS that allows the users to directly mail to the desired email from the default email software of your Computer, Smart Phones. In case of windows, it will run Outlook software automatically when you click on a mailto protocol. You can change the default mail software from outlook to any other customized tools that you want.

Simplest way of using mailto syntax

You may have seen the below example many times. While you are browsing at different webpages, you may see an email address that visible like links. But when we click on it, our default email software popup and allows you to send email directly. This kind of settings are made for providing more user experience.

Simple mailto syntax

<a href=”mailto:yourmail@domain.address“>Mail Us</a>

This will visible in browser page as below

Mail Us

For example if you want to mail to our mail address, our mail id is the above syndax will be changed as follows.

<a href=”“>Mail Us</a>

This will visible in browser page as below

Mail Us

Here the mail Us is the visible part. You can change it to your email address, so that your customers can mail to you from external tools. Other wise, they will get confused about your email address. Whenever you use mailto syndax, please do it as follows.

<a href=”mailto:yourmail@domain.address“>yourmail@domain.address</a>

It look likes


Mailto Syntax if there is multiple Recipients


There may be multiple Recipients for some kind of emails. For example if two persons are handling same designation and in your page if you need to add mailto with two recipients here is the syntax.

<a href=”,,“>Contact Us</a>

Here is the email address of first recipient. is the email address of Second recipient. is the email address of Third recipients.

In the browser page above code will perform like below.

Contact Us

Mailto Syntax if there is a subject Line

<a href=” Subject Part“>Mail Us</a>

The above code is the mailto syntax if there is a subject line by default. In many situation, you need to implement this code in your webpage.  The code will show in a webpage as below.

Mail Us

Mailto Syntax with a cc

If you need to Carbon Copy the email address with mailto syntax, below is the code.

<a href=”,“>Mail Us</a>

Syntax including a bcc:

This is the code of including a bcc in mailto syntax

<a href=”,“>Mail Us</a>

Insert a body paragraph in mailto suntax

You may suppose need to insert some body in the email similar to insertion of subject. For that the following is the syntax.

<a href=” paragraph.“>Mail Us</a>

This will shown in a browser window as follows

Mail Us

Hope all of you got me. But in our latest technologies to for making websites like dream weaver, etc there is no need of by-hearting all this syntax. These tools will automatically leads you for successful email insertion.

Rishi yadav is the founder of MyTechTalk.A Popular tech blog dediceted for Geeks and blogger You Can Follow Me on Facebook Or You Can Connent With Me On Twitter @alltechpeople