none
Use Existing Subject While replying using hyperlink from subject body RRS feed

  • Question

  • Hello,

    I am sending an email to a user with the subject as employee id(12345) and the mail body having 3 options:

    1. Yes

    2. No

    3. No action

    My requirement is that all the 3 options must be hyperlinked and as soon as the user clicks on, say, "No". A reply should be drafted with Subject as: No: 12345

    I tried by using Create Hyperlink but the subject there is static.

    Any suggestions on how this can be done would be really helpful.

    Thanks,

    Vaibhav


    Wednesday, March 4, 2020 10:48 AM

All replies

  • Hi Vaibhav15211,
    Based on your description, could you explain what type of your project? And could you please provide some related code to reproduce the situation?
    According to my understanding, I made a code example you can refer to.
    You can add Microsoft.Office.Interop.Outlook reference firstly.

    Application app = new Application();
    NameSpace NS = app.GetNamespace("MAPI");
    MAPIFolder objFolder = NS.GetDefaultFolder(OlDefaultFolders.olFolderOutbox);
    MailItem objMail = (MailItem)objFolder.Items.Add(OlItemType.olMailItem);
    objMail.HTMLBody ="<div>1.<a href=\"" + "link" + "\">Yes</ID></a></div> <div>2.<a href=\"" + "link" + "\">NO</ID></a></dic> <div>3.<a href=\"" + "link" + "\">No action</ID></a> </div>";
    objMail.Subject= "employee id(12345)";
    objMail.To = "email address";
    objMail.Send();

    Hope it could be helpful for you.
    Best Regards,
    Daniel Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, March 5, 2020 9:00 AM
  • Hi Vaibhav15211,
    Has your problem been solved? If it is resolved, we suggest that you mark it as the answer. So it can help other people who have the same problem find a solution quickly.
    Best Regards,
    Daniel Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 10, 2020 9:16 AM