How to use mailto syntax? Complete tutorial with example

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:[email protected]“>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 [email protected] the above syndax will be changed as follows.
<a href=”mailto:[email protected]“>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:[email protected]“>[email protected]</a>
It look likes
[email protected]

Mailto Syntax if there is multiple Recipients

Gmail-banner
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=”mailto:[email protected],[email protected],[email protected]“>Contact Us</a>
Here [email protected] is the email address of first recipient.
[email protected] is the email address of Second recipient.
[email protected] 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=”mailto:[email protected]?subject=The 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=”mailto:[email protected][email protected],[email protected]“>Mail Us</a>
Syntax including a bcc:
This is the code of including a bcc in mailto syntax
<a href=”mailto:[email protected][email protected],[email protected]“>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=”mailto:[email protected]?body=First 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, ASP.net etc there is no need of by-hearting all this syntax. These tools will automatically leads you for successful email insertion.

Can't get enough freebies? Subscribe to FirstAndGeek

SUBSCRIBE TO FIRSTANDGEEK
POPULAR POSTS

Have an app, software or tech product you want us to review?

WHAT IS FIRSTANDGEEK?

A quick simple digest of the top tech stories, delivered right to your inbox!

Contact Us

More Articles

First and Geek Staff

AirSounds MAX True Wireless Earbuds

Upgrade your on-the-go listening with a pair of wireless Bluetooth earbuds. Take advantage of technological improvements that have enhanced comfort, sound quality, charging capabilities and more with the AirSounds

Read More »
Scroll to Top