logo
HTML Email Links
The anchor element <a> can be used to create email links or mailto links.

Mailto link is a type of HTML link that activates the default mail client on the computer for sending an e-mail.

The anchor element <a> can be used to create email links or mailto links. Mailto link is a type of HTML link that activates the default mail client on the computer for sending an e-mail.



Example Program
<html>
   <head>
   <title>Mailto Link</title>
   </head>
   <body>
       <a href="mailto:freetimelearn@gmail.com">Send an Email</a>
   </body>
</html>
Output :
Mailto Link with Subject
1.To add spaces between words in the subject use the code "%20".However most systems can work with regular spaces.

Note:- In the below example, the default email program's subject field will contain the text "Feedback" when it first opens up.
Example Program
<html>
   <head>
   <title>Mailto Link</title>
   </head>
   <body>
        <p>
  <a href="mailto:info@freetimelearning.com?subject=Feedback">Please tell me..!</a> This is so nice website.
</p>
   </body>
</html>
Output :

Please tell me..! This is so nice website.

Mailto Link with cc and bcc
1. When the user clicks on mailto link using properties of cc and bcc the email program opens up with field cc and bcccontaining email addresses of recipients specified in the value.

2. Remember that using cc allows recipients to see each other, while using bcc keeps all recipients secret.
Example Program
<html>
<head>
   <title>Mailto Link with cc and bcc</title>
</head>
<body>
     <p>Mailto link using cc property</p>
    <a href=
    "mailto:info@freetimelearn.com?cc=support@freetimelearn.com,freetimelearn@gmail.com">
    Click Here</a> 
    
    <p>Mailto link using bcc property</p>
    <a href=
    "mailto:info@freetimelearn.com?bcc=support@freetimelearn.com,freetimelearn@gmail.com">
    Click Here</a>
 </body>
</html> 
Output :

Mailto link using cc property

Click Here

Mailto link using bcc property

Click Here