- HTML Tutorial
- HTML References
- HTML Resources
Mailto link is a type of HTML link that activates the default mail client on the computer for sending an e-mail. The web browser requires a default e-mail client. Outlook.com is a free personal email service from Microsoft that doesn't scan your email for the purpose of serving you ads. Automatically file emails and share photos easily. Note: A modern browser is needed to use the standard (Ajax/Web 2.0) interface. Tested to work: IE7+, Safari 3.1+, Firefox 3.0+, Google Chrome 1+ - Mostly works in: Opera 9.51, Firefox 2.0, Camino 1.69 - Will NOT work in: various other older browsers including IE6.
- Selected Reading
It is not difficult to put an HTML email link on your webpage but it can cause unnecessary spamming problem for your email account. There are people, who can run programs to harvest these types of emails and later use them for spamming in various ways.
You can have another option to facilitate people to send you emails. One option could be to use HTML forms to collect user data and then use PHP or CGI script to send an email.
Html Mail Form
A simple example, check our Contact Us Form. We take user feedback using this form and then we are using one CGI program which is collecting this information and sending us email to the one given email ID.
Note − You will learn about HTML Forms in HTML Forms and you will learn about CGI in our another tutorial Perl CGI Programming.
HTML Email Tag
Html Mail Tag
HTML <a> tag provides you option to specify an email address to send an email. While using <a> tag as an email tag, you will use mailto: email address along with href attribute. Following is the syntax of using mailto instead of using http.
This code will generate the following link which you can use to send email.
Now, if a user clicks this link, it launches one Email Client (like Lotus Notes, Outlook Express etc. ) installed on your user's computer. There is another risk to use this option to send email because if user do not have email client installed on their computer then it would not be possible to send email.
Html Mailer
Default Settings
You can specify a default email subject and email body along with your email address. Following is the example to use default subject and body.
Html Mail Drupal
This code will generate the following link which you can use to send email.