用Mirth Connect通过javaMail库读取电子邮件 [英] Reading emails through javaMail library with Mirth Connect

查看:633
本文介绍了用Mirth Connect通过javaMail库读取电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目标是通过Mirth Connect渠道阅读电子邮件(并可能将其标记为收件箱中的内容)。我发现这个从开源的Mirthconnect读取邮件问题的问题。奇怪的是,询问的人回答了这个问题。当我试图实现他提供的代码,而不是gmail outlook收件箱(这里没有问题),该渠道提出错误:

My goal is to read emails(and possibly mark them as read in the inbox) through Mirth Connect channels. I found this Reading mail from open source Mirthconnect question about the issue. Oddly the person asking answered the question. When I tried to implement the code he provided with my specifications such as instead of gmail outlook inbox(no problems here) the channel called out error:

64DETAILS:
    TypeError: Cannot find function getBodyPart in object <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi!</div>...(here the email continues with div tags)

所以我清楚地得到电子邮件数据,但getBodyPart打破它。我从此理解的是,他的代码是针对特定类型的电子邮件,我想我在这里的示例中收到了非MIME邮件。

So I clearly get the email data but getBodyPart breaks it. What I understood from this is that his code was meant for specific kind of emails and I guess I received an non-mime email in the example here.

所以看起来我问:如何创建一个将所有邮件翻译成纯文本的读者,然后将其输出到记录器/其他输出中,以便我可以管理它?

So it seems what I am asking: How do I create a reader that translates all mail into plain text and then output it into the logger/other output so I can manage it?

管理层将意味着将邮件专门传播到不同渠道,并将其标记在他们来自的收件箱中。

Management would mean something like spreading specifically titled mail into different channels and mark them read in the inbox they came from.

我希望我对我的问题很清楚,并遵循提问的规则。

I hope I'm clear enough with my question and follow the rules of asking questions.

推荐答案

我正在回答您更新的查询。该程序将重复阅读电子邮件,因为您提到的是正确的,以便在阅读后避免这种情况,您需要将电子邮件移动到其他文件夹,还可以自定义您的程序以从特定的电子邮件发件人或基于主题以便它只读取您的特定电子邮件,您可以将该电子邮件移动到您希望的文件夹。

I am answering to your updated query.This program will be reading the email repeatedly as you mentioned is correct so as to avoid this after reading you need to move the email to other folder and also you can customise your program to read from particular email sender or based on subject so that it reads only your particular email and you can move that email to you wished folder.

这篇关于用Mirth Connect通过javaMail库读取电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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