Summary -

In this topic, we described about the Email Links topic in detail.

It is not best practice to specify the emailId directly on the HTML which might cause of spamming the mailbox. There are actually two ways to specify the email links on HTML page.

  1. HTML Forms
  2. HTML Email Links

HTML forms can be discussed in further topics or Visit HTML Forms here.

The best example for the HTML forms in our shop are the contact us form. Visit Contact us form here.

Email links that activates mail client on computer for sending mails. Mailto attribute is used to send the mails. Mailto attribute provides as part link tag(<a>). The web browser requires the mail client should install on the computer to send mail.

Syntax -

<a href="">Send Mail</a>

The above code will generate a link on HTML page. If user clicks on the link, it launches the email client which is installed on the specific computer where the user clicked the link.

If the any email client is not installed on the machine, then it is not possible to send the email from the specific machine.

mailto:TOMailid@email.come-mail recipient address
cc=CCMailid@email.comcarbon copy e-mail address
bcc=BCCMailid@email.comblind carbon copy e-mail address
subject=subject textsubject of e-mail
body=body textbody of e-mail
?first parameter delimiter
&other parameters delimiter

Example1 -

Below example describes about sending mail from HTML page.

<!DOCTYPE html>
	<title> HTML Email Links Example</title>
		<a href="mailto:contact@">Email Us here</a>	

Output -

Example2 -

Below example describes about sending mail from HTML page with CC, BCC, subject and body.

<!DOCTYPE html>
	<title>Email Example with CC,BCC,subject and body</title>
   		 <a href="
    	Email Us here with CC, BCC, Subject and body</a>

Output -