简体   繁体   English

Mailkit IMap 客户端 - 如何解析来自 email 线程的 rest 的回复

[英]Mailkit IMap Client - How to parse reply from the rest of the email thread

I am using Mailkit to build an IMap mail client.我正在使用 Mailkit 构建 IMap 邮件客户端。 I am able to connect to an email account, get a list of MimeMessages and get the message Body, HtmlBody, TextBody etc.我能够连接到 email 帐户,获取 MimeMessages 列表并获取消息正文、HtmlBody、TextBody 等。

In the case where emails are being replied to and therefore a conversation thread is being established;如果正在回复电子邮件并因此正在建立对话线程; is there a way to get just the reply text from each reply without the rest of the conversation.有没有办法在没有对话的 rest 的情况下仅从每个回复中获取回复文本。

All you need to do is to get the body text and then filter out lines starting with "> " .您需要做的就是获取正文,然后过滤掉以"> "开头的行。

Lines starting with "> " is quoted text from a previous message in the thread."> "开头的行是线程中上一条消息的引用文本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM