如何在C#中从Outlook获取MailItem的最新答复? [英] How to get last reply of a MailItem from Outlook in C#?

查看:146
本文介绍了如何在C#中从Outlook获取MailItem的最新答复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从MailItem中获取Outlook对话中的最后一个答复.我不想收到全部邮件.

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

我试图获取MailItem的消息,但是每次收到整封电子邮件时,我都无法回信,不仅是最后一封信.

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!

推荐答案

解析消息正文并提取最新文本是您的责任.请记住,您可能无法执行此操作,因为没有什么可以阻止用户在以前的答复中输入内容,而不仅是在消息的顶部(或底部)输入内容.

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.

这篇关于如何在C#中从Outlook获取MailItem的最新答复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆