none
How to set In Reply to and references field in C# RRS feed

  • Question

  • Hi All,

    I am writing VSTO mail plug in. My requirement is that for reply / forward mails, to group them in different platform, I have to set "In reply to" and references field in mail before sending them. I have handled "Item Send" event and there I have written following code :--

    Here MessageID and references are string. Lets suppose there value is "xyz" and "abc".

                if (!string.IsNullOrEmpty(MessageID))
                {
                    objMail.PropertyAccessor.SetProperty(ConstLiteral."http://schemas.microsoft.com/mapi/proptag/0x1042001e", MessageID);
                }
                if (!string.IsNullOrEmpty(References))
                {
                    objMail.PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/proptag/0x1039001E", References);
                }

    Now issue is when I send the mail, I verify the mime of mail from send items, it has correct "In reply to" and references values. But when I check received mails in inbox, it does not have in Reply to and references fields at all. 

    I am setting some other values as well like Thread Index , Thread topic and message ID but they are fine. Can some one please suggest how can I set values in these 2 fields, so that even mime of received mail, these fields could be present ?

    Thanks a lot for help.

    Regards,

    Dev

    Tuesday, December 19, 2017 6:22 PM

All replies

  • Hi All, 

    One small correction. I am not setting message id but I am setting thread index, thread topic, in reply to and references. Please find below the header of mime from my send items :--

    Subject: Secured by 29w3kJrlKQxomSnABDMfYJi8gqVoDSJM
    Thread-Topic: Secured by 29w3kJrlKQxomSnABDMfYJi8gqVoDSJM
    Thread-Index: AQKzSjMjtR5MEhXW0lT8cvRRP17j2QAAAABs
    To: qa.user16@dmtest.xyz,
     dev@dmtest.xyz
    In-Reply-To: <fd1e2e1ce36f404cb43acc6eff70ede6@CATOMDCSVDEV001.dmtest.xyz>
    References: <fd1e2e1ce36f404cb43acc6eff70ede6@CATOMDCSVDEV001.dmtest.xyz>
     <fd1e2e1ce36f404cb43acc6eff70ede6@CATOMDCSVDEV001.dmtest.xyz>
    MIME-Version: 1.0

    Please find below the mime from my inbox:--

    Received: from CATOMDCSVDEV001.dmtest.xyz (10.88.40.10) by
     CATOMDCSVDEV001.dmtest.xyz (10.88.40.10) with Microsoft SMTP Server (TLS) id
     15.0.1293.2 via Mailbox Transport; Tue, 19 Dec 2017 13:57:20 -0500
    Received: from CATOMDCSVDEV001.dmtest.xyz (10.88.40.10) by
     CATOMDCSVDEV001.dmtest.xyz (10.88.40.10) with Microsoft SMTP Server (TLS) id
     15.0.1293.2; Tue, 19 Dec 2017 13:57:20 -0500
    Received: from CATOMDCSVDEV001.dmtest.xyz ([::1]) by
     CATOMDCSVDEV001.dmtest.xyz ([::1]) with mapi id 15.00.1293.002; Tue, 19 Dec
     2017 13:57:20 -0500
    From: Dev Tiwari <Dev@dmtest.xyz>
    To: QA User16 <QA.User16@dmtest.xyz>, Dev Tiwari <Dev@dmtest.xyz>
    Subject: Secured by 29w3kJrlKQxomSnABDMfYJi8gqVoDSJM
    Thread-Topic: Secured by 29w3kJrlKQxomSnABDMfYJi8gqVoDSJM
    Thread-Index: AQKzSjMjtR5MEhXW0lT8cvRRP17j2QAAAABs
    Date: Tue, 19 Dec 2017 13:57:20 -0500
    Message-ID: <70e471deda8943d59dee8dc18d983dd9@CATOMDCSVDEV001.dmtest.xyz>
    Accept-Language: en-US, en-CA
    Content-Language: en-US

    Please check if I am setting values in some wrong format ?

    Thanks

    Dev

    Tuesday, December 19, 2017 7:08 PM
  • Hi Devendra Tewari,

    can you post your code.

    so that we can see what exactly you are doing in your code.

    we will try to reproduce the issue on our side.

    we will try to find the solution if any available.

    thanks for your understanding.

    Regards

    Deepak


    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, December 21, 2017 8:03 AM
    Moderator