mailto - How to insert a URL hyperlink in the Body with DisplayText
-
Hi, I am using Javascript to open up the default mail client and start an email eg string mailto = "mailto:?Subject=Link to your order&Body=Here is the link to your order" + Request.Url.ToString() + "?Id=323498; ScriptManager.RegisterStartupScript(UpdatePanel1, typeof(string), "mailto", "window.open('" + (mailto) + "');", true); This works well and I get an email sent through with the hyperlink visible (and clickable - yay!) What I want to do however is to provide Display Text for the hyperlink so that whilst the underlying URL is eg http://www.google.com?id=323498 the text visible to the recipient is Your Link or something appropriate. So it is the same concept as in Outlook when you Insert Hyperlink, you provide the Address but you can also provide Text to Display. (Same in GMail etc). Any ideas how to achieve this? Thanks!!
-
Hi, I am using Javascript to open up the default mail client and start an email eg string mailto = "mailto:?Subject=Link to your order&Body=Here is the link to your order" + Request.Url.ToString() + "?Id=323498; ScriptManager.RegisterStartupScript(UpdatePanel1, typeof(string), "mailto", "window.open('" + (mailto) + "');", true); This works well and I get an email sent through with the hyperlink visible (and clickable - yay!) What I want to do however is to provide Display Text for the hyperlink so that whilst the underlying URL is eg http://www.google.com?id=323498 the text visible to the recipient is Your Link or something appropriate. So it is the same concept as in Outlook when you Insert Hyperlink, you provide the Address but you can also provide Text to Display. (Same in GMail etc). Any ideas how to achieve this? Thanks!!
I don't know how to achieve this in javascript but your email body has to be a html body and not a plain text body as your sample code looks like. After you set this email property you can use html instead of plain text in your email body.
Greetings Covean