1

I want to make a mailto html tag with html body in it. The content I want to send is

Hello "Name"

Good Morning (in bold)

How can I make this possible ?

I tried to put <br/> <b> etc in mailto body attribute but not worked.

My body content is generated using c# code

code behind

mailLink.InnerHtml = string.Format("<a href=\"mailto:help@domain.com?Subject=Help code&body='" + System.Web.HttpUtility.HtmlEncode(result.ToString()) + "'+\"target=\"_top\">Send Mail</a>");

aspx page

<div id="mailLink" runat="server"></div>
Community
  • 1
  • 1
Ashish-BeJovial
  • 1,829
  • 3
  • 38
  • 62

1 Answers1

0

As answered here: MailTo with HTML body

The standard for the mailto HTML tag to have the body was designed for a small plain text message only.

What would be better is to have the link activate an API or process that sent your message instead. And that could be a URL link. Like this answer: how to send email through asp.net web api

Let us know what you did to work around the issue.

Community
  • 1
  • 1
XP JG
  • 1
  • 1