How to get last reply of a MailItem from Outlook in C#?

一个人想着一个人 提交于 2019-12-25 00:27:53

问题


I want to get the last reply in an Outlook Conversation from a MailItem. I don't want to get the whole mail.

I tried to get the messages of MailItem but I couldn't, every time I got the whole email, not only the last reply.

Outlook.MailItem item = Items.GetLast();
MessageBox.Show(item.Body);

I expected to get only the last reply message from the mail thread but I got the whole mail instead!


回答1:


It is your responsibility to parse the message body and extract the latest text. Keep in mind that you might not be able to do that since nothing prevents the user from typing inside the previous replies rather than only at the top (or bottom) of the message.



来源:https://stackoverflow.com/questions/56145308/how-to-get-last-reply-of-a-mailitem-from-outlook-in-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!