locked
Mailto in mail body RRS feed

  • Question

  • I have an requirement in vb.net like, Body of Outlook mail item should contain a link. On clicking that link, another mail item should open with To list and CC list. I am using below code,

     string Body = "";
     Body += "Please, click the below link to view the details. %0D%0D"
     Body += "<a href=mailto:" + cc + "?Subject=" + Subject + "> Click here to Approve </a>"
     sMsg = User.Redirect("mailto:" + cc + "?Subject=" + Subject + "&body=" + Body)
     ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "showalert", sMsg, True)

    But I am not getting the link properly in Outlook. It is displaying as below,

    Please, click the below link to view the details. 
    <a href=mailto:xxx@domain.com?Subject=DCW Trucking Ltd.> Click here to Approve </a> 

    I need to have only 'Click here to approve as link'.

    I should not use Outlook dll. Please help asap.

    • Moved by Barry Wang Monday, November 3, 2014 9:05 AM
    Friday, October 31, 2014 7:30 AM

All replies

  • You need to set the HtmlBody instead of Body.
    Friday, October 31, 2014 8:53 AM
  • Hello Dhasarath,

    Based on your code, it seems you are using an ASP.NET project so please consult ASP.NET experts on here:

    http://forums.asp.net/

    Best regards,



    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, November 3, 2014 9:05 AM