简体   繁体   中英

How can I add a linked text to email with JavaScript?

I'm trying to add a linked text to a JavaScript generated email such as: Hi, here is some text that if you'll click on, will bring you to some web page

I don't care much about the format (Underline or bold etc.).

I found some threads regarding using HTML, but also found that it is not always working (depends on default mail).

Is there any way I can do it using my mailto: value?

You can add only a plain text into mailto's body:

<a href="mailto:someone@example.com?subject=SUBJECT&cc=test@example.com&body=BODY">SEND</a>

The "body" should contain the content for the first text/plain body part of the message. The mailto URL is primarily intended for generation of short text messages that are actually the content of automatic processing (such as "subscribe" messages for mailing lists), not general MIME bodies [source]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM