How to send E-Mail from HTML Page ?

Email links are created using the HTML anchor tag < a > … < /a > , which is the same tag used for creating links to another web page. Here the only difference is that you have to set the HREF property equal to the email address, rather than specifying a web URL.

HTML email

In order to create a link on your Web site that opens a new email window with specified address, use the following link.

<a href="mailto:[email protected]">Send Emil</a>

The above code results in the visitor’s default email program opening a new email window with the address you specified in the mailto: .

You have to specify your email address instead of [email protected] in the href.

The above code display in browser like this:

HTML Email Code

If you want send email to more than one address, simply separate the email addresses with a comma.

<a href="mailto:[email protected],[email protected]">Send Emil</a>

You can have both the SUBJECT and the BODY of the email automatically populated for your visitors.

<a href= "mailto:[email protected]?subject=HTML Email Test&body=
This is a test for HTML Email" > Send Emil</a>

You can also set up your email link with a CC and BCC.

<a href= "mailto:[email protected][email protected]" >
Send Emil</a>

If you create an email link on your website, you may see an increase in spam. So be careful when creating email links because spammers often use scripts to scrape web sites looking for email addresses.