简体   繁体   English

mailto:在邮件正文中放置一个链接但不显示 url

[英]mailto: put in the mail body a link but not showing the url

It's about the fact that I don't want to show the full link in an email, but a short text where the link is stored.这是因为我不想在电子邮件中显示完整链接,而是显示存储链接的短文本。 If you click on "Open Link" you should be redirected to the URL.如果您单击“打开链接”,您应该会被重定向到该 URL。 The text "Open Link" should also be bold.文本“打开链接”也应该是粗体。 I am using Angular.我正在使用角度。

<a
href="mailto:test@test.com?subject={{this.mailService().template(receiver).subject}}&body={{this.mailService().template(receiver).body}}" target="_top">
public template(receiver) {
return new Mail(

`Subject: Open Link`,

`Body:` +
`Open Link`
);

} }

Outlook opens for me and the subject and body text is displayed. Outlook 为我打开并显示主题和正文。 I just want the link not to be fully displayed in the subject and body, but to be stored behind a text.我只是希望链接不要完全显示在主题和正文中,而是存储在文本后面。

As seen here:如这里所见:

在此处输入图像描述

I've also tried it with HTML code in my template method.我还在我的模板方法中用 HTML 代码尝试过。 HTML is not recognized.无法识别 HTML。

<a href="https://www.stackoverflow.com">Open Link</a>

I've already googled but found nothing about my problem.我已经用谷歌搜索但没有发现我的问题。 https://www.google.com/search?q=mailto+hyperlink+with+body https://www.google.com/search?q=mailto+hyperlink+with+body

This is not possible, because the mailto link can only contain plain text, not HTML.这是不可能的,因为 mailto 链接只能包含纯文本,不能包含 HTML。

From RFC 6068 : 来自 RFC 6068

The "body" field value is intended to contain the content for the first text/plain body part of the message. “正文”字段值旨在包含消息的第一个文本/纯正文部分的内容。 The "body" pseudo header field is primarily intended for the generation of short text messages for automatic processing (such as "subscribe" messages for mailing lists), not for general MIME bodies. “body”伪报头字段主要用于生成用于自动处理的短文本消息(例如邮件列表的“订阅”消息),而不是用于一般的 MIME 主体。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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