About mailto link HTML | Open default mail client

HTML mailto attribute uses to create a mail link that activates the default mail client on the computer for sending an e-mail. It will open default e-mail client software or app.

Note: Default mail program (installed Software/Apps) required to activate the e-mail client.

Example of mailto link HTML

Just use <a> tag and href to create email link.

Some important attributes can use:-

mailto:[email protected]e-mail recipient address
cc=[email protected]carbon copy e-mail address
bcc=[email protected]blind carbon copy e-mail address
subject=subject textsubject of e-mail
body=body textbody of e-mail
?first parameter delimiter
&other parameters delimiter


Output: If default mail client is Microsoft Outlook, then pressing a mailto link will open a new mail window.

Create mailto link HTML

Email address with the subject

Adding CC and BCC

Use parameters cc and bcc to the href value.

Adding Body Text

Just add the body parameter into list of parameters.

mailto link with subject and body

mailto with content:

Add spaces in the mail’s subject or body

Add spaces by writing %20 in the text of the subject or body.

Add line break in the mail’s body

Add newline by writing %0D%0A in the text of the body.

Do comment if you have any doubts and suggestions on this topics.

Note: The All HTML Examples codes are tested on the Firefox browser and the Chrome browser.

OS: Windows 10

Code: HTML 5 Version

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.