html5 email link – mailto Examples

Make links to html5 send email to predefined address using user’s email basic Source Code Example.

Mailto Link

  • 1.The html 5 based simple anchor element <a> can be used to make a email links or send mailto links.
  • 2.The HTML EMAIL helps to the send mail using mailto link when simple clicked opens peoples default send email basic Source Code Example or any types of the software. A fresh create a open new email page is created with send mail “To” field data of the containing the address of the name certain on the href link by default.

snippet:Email Links or Mailto


<a href="mailto:[email protected]">Click To Send an Email </a>


summary- here Mailto links may easy to use for attract a more of spam to your any inbox.
Also Read: PHP Contact Form Send Email Add More File Attachment

Advanced properties of a Mailto Link.

Along with the mailto HTML links displayed above source code example you also send other options of the custom message like as email Subject, email Message Body text or data and special certain mode options of sending multiple users like as a “cc” and “bcc”

Read Also:  How to Count Number of Files in directory PHP?

To use any of the more advanced mailto link parts add a question mark “?” and then the client HTML 5 email address(to separate), after included each user information like name/value pairs of the some Advanced properties example bellow.

Eg: <a href="mailto:[email protected]?subject=Feedback">

here also You can also use multiple(two or more) properties by separating data containts the name/value pairs with an ampersand (“&”).

Eg: <a href="mailto:[email protected]?subject=Feedback&[email protected]">

Mailto link Properties and Descriptions.

  • Subject: The client’s email basic Source Code Example’s subject field contains the value specified within subject property by default.
  • Body: Adds a message by default in users email basic Source Code Example which the client can alter or delete.
  • cc: To send a “Carbon Copy” of the users email to the email address specified, multiple addresses like as two or more are seperated by comma like example [email protected], [email protected], [email protected].
  • bcc: To send a “Carbon Copy” of the users email secretly type like that no any user recipient can display other recipients.

Also Read: PHP Send HTML Email Table Format Template

Read Also:  multiple drop down list in php using ajax

Mailto Link with Subject.

1.To add spaces between words in the subject use the source code “%20”.However most systems can work with regular spaces.

snippet:Mailto Link with Subject.


<a href="mailto:[email protected]?subject=Feedback">Tell us</a> 
how you feel about the website.


summary- In the above example, the default email basic Source Code Example’s subject field will contain the text “Feedback” when it first opens up.

Mailto Link with cc and bcc

1.When the user clicks on mailto link using properties of cc and bcc the email basic Source Code Example opens up with field cc and bcc containing email addresses of recipients specified in the value.

Also Know that using cc supports recipients address to display each other, while using mode of the bcc keeps all users of the recipients secret type.

snippet Link Target _blank Attribute.

<p>Mailto link using cc property</p>	
<a href=
"mailto:[email protected][email protected],[email protected]">
Tell us</a> 

<p>Mailto link using bcc property</p>
<a href=
"mailto:[email protected][email protected],[email protected]">
Tell us</a>	

summary- While using cc as well as bcc both make sure they are separated by a ampersand(“&”).
Also Read: Node.js Sending Email Nodemailer Tutorial

Read Also:  Send Email via SMTP Server in Node.js using Nodemailer npm

Mailto Link :Body

Also You can use the body parameter to add a default message into the body section of the email.

It usually data contains formal type greetings message, your list of the contact mail address etc.So the user can alter, Edit with update or (remove)delete the mail message.

snippet:Mailto link using Body parameter

<p>Send Mailto link using the HTML 5 Body parameter</p>
<a href=
"mailto:[email protected]?body=Your message within Main Body">
Tell us</a>	

summary- To make text within the html5 Body to display on a added some fresh line use the URL encode %0%A.

Also Read: How to Send Email From the Linux Command line?

Send e-mail to HTML 5


<!DOCTYPE html>

<h2>Send e-mail to [email protected]:</h2>

<form action="mailto:[email protected]" method="post" enctype="text/plain">
<input type="text" name="name"><br>
<input type="text" name="mail"><br>
<input type="text" name="comment" size="80"><br><br>
<input type="submit" value="Send">
<input type="reset" value="Reset">


Leave a Reply

Your email address will not be published. Required fields are marked *