Home » html5 email link – mailto Examples

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

 <!DOCTYPE HTML>    
<html>
<body>

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

</body>
</html>	

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:  Handling Active Navigation Menu in Laravel Example

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.
Read Also:  Add or Remove Table Rows Dynamically in AngularJS

Also Read: PHP Send HTML Email Table Format Template

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.

<!DOCTYPE HTML>
<html>
<body>
<p>

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

</p>
</body>
</html>

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:  Vue JS Get String length Property

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

index.html

<!DOCTYPE html>
<html>
<body>

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

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

</body>
</html>


Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  Cross Header Access Control Allow Origin missing
  2. Read Also:  Reactjs Form Validation Example with Demo
  3. Read Also:  javascript validation registration form
  4. Read Also:  jquery replace newline with br Example - Convert new lines to br - nl2br function
  5. Read Also:  how to retrieve data from database in html form using PHP
  6. Read Also:  Files Uploading on Amazon S3 server using Laravel 5.4 Part-2
  7. Read Also:  PHP Autocomplete Textbox using jQuery Example
  8. Read Also:  how to retrieve data from database in html form using PHP
  9. Read Also:  Handling Active Navigation Menu in Laravel Example
  10. Read Also:  Vue JS Get String length Property

Leave a Comment

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