Instructions for sending email JavaScriptmailto

Source: Internet
Author: User
This article introduces how to use JavaScriptmailto.

JavaScript mailto

If you forget your password, you can send an email to your 123@123.com

The problem of garbled MAILTO Chinese titles is that the encoding method of outlook is GBK. You can solve this problem by setting the HTMLmeta encoding format.



The line feed in the body can be implemented in this way. The line feed is "% 0A" in the URL encoding"
Click 1

As you know, mailto is a very practical html Tag in web design and production. Many friends who have personal webpages like to write their own email addresses in the conspicuous position of the website, in this way, once a web browser clicks a super connection consisting of mailto, It can automatically open the default email client software in the current computer system, such as OutLook Express and Foxmail. Of course, the use of mailto labels is not just as simple as described above, but also has other applications. In order to help you have a comprehensive understanding of the mailto tag, I will make a detailed summary of the use of the mailto tag here, hoping to share with you!

1. If we create a super connection like "mailto: aaa@21cn.com" in the web page, click the super connection with the mouse, the browser will automatically call the system's default mail client program. At the same time, the recipient's address is automatically written in the recipient settings bar of the mail editing window, while other content is blank and left to the visitor to fill in;

2. If you want the system to automatically open the email editing window when you click the email super connection, in addition to automatically entering the content in the recipient's address bar, in the CC address bar can also automatically fill in the e-mail address you need, you can directly insert in the html source code of the web page such as "mailto: aaa@21cn.com? Bbb@21cn.com, where the aaa@21cn.com will automatically appear in the recipient's address bar and the bbb@21cn.com will automatically appear in the CC address bar;

3, if you want to automatically fill in the subject content of the mail in the pop-up dialog box, you can use the form of "mailto: aaa@21cn.com? Subject = 'mailto' app tips: When a viewer clicks an email superconnection consisting of the statement, the aaa@21cn.com automatically appears in the recipient's address bar in the subsequent mail edit window that opens, and the 'mailto' tip pick up is automatically displayed in the topic settings bar;

4. If you want to enter multiple email addresses at the same time in the recipient's address bar, you can use statements like mailto: aaa@21cn.com; bbb@21cn.com, remember that each email is separated by a comma (;), so that when the viewer clicks the email hyperlink created by the statement, in the recipient address bar in the pop-up mail edit window, recipient addresses such as aaa@21cn.com and bbb@21cn.com appear, and viewers can send emails to these people at the same time;

5. the email addresses displayed on the webpage are often searched by automatic search programs such as "mail-robot, in this way, other people can easily send a variety of spam to you using the searched email addresses. In order to reject these spam emails thousands of miles away, we can write the email addresses published on the web page as ASCII code, and remember to add "& #" before each ASCII Code. For example, we can use "mailto: aaa@21cn.com "to create an email hyperlink, click the hyperlink and we find that in the subsequent mail receiving and receiving window, the recipient's address bar still displays content like aaa@21cn.com, and other automated email search tools do not properly recognize such ASCII code, therefore, the number of spams received by users with unknown origins is greatly reduced;

6. Generally, when a viewer clicks the email superconnection, the system automatically fills in the recipient's address bar in the default mail client software, and other settings bar is still displayed as blank, If You Want To automatically subject, CC, dark or even content are filled on, you can use the form of "mailto: aaa@21cn.com? Cc = bbb@21cn.com & bcc = ccc@21cn.com & subject = 'mailto' application tips pick up the zero & body = mailto tag comprehensive application example !" In such a statement, the first function in this statement is "?" Each of the subsequent functions starts with "&". When you click this email address with the mouse, in the subsequent mail editing window, we will see that the aaa@21cn.com is automatically filled in the recipient's address bar, the bbb@21cn.com is automatically filled in the CC address bar, And the ccc@21cn.com is automatically filled in the dark send address bar, in the topic bar, "'mailto' tips are automatically entered to pick up zero. In the text of the letter, a comprehensive example of" mailto tag "is automatically displayed!" Such text.

The above aaa@21cn.com, bbb@21cn.com, ccc@21cn.com are for the convenience of instruction, and the author set at will, you can according to their own requirements, with their real mail address to replace them; in addition, if you want to use mailto to implement multiple functions at the same time, the first function must start with "?" Each function starts with "&". In addition, cc is the cc address, bcc is the dark send address, and subject is the subject of the email, body is the content of the email.

To wrap a line in the BODY, you only need to add "% 0d % 0a" between the row and the row ".

Aaa



For more information about how to use JavaScript mailto to send emails, see the PHP Chinese website!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.