Skip to content Skip to sidebar Skip to footer

Reading Emails Through Javamail Library With Mirth Connect

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 is

Solution 1:

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.

Solution 2:

I was the one whom you mentioned in the code. When I tried to fetch the mail from GMAIL also I faced the same issue. But I checked the security apps OFF, I have provided the link here for GMAIL. I guess something like this must be available for outlook as well. But I have tried the same code to read in my outlook it worked fine without any changes been made (not sure how?).

For GMAIL Security OFF https://myaccount.google.com/lesssecureapps

It depends on the kind of mail your are reading. In my case I was getting HTML designed data in the body of the mail.That code was not generalized one. It is supposed to read HTML data in mail body.I'm not sure how your mail is?. But mp.getBodyPart(0) or mp.getBodyPart(1) should provide some output. Even if you attach the file in the mail, mp.getBodyPart will read the attachment.

Post a Comment for "Reading Emails Through Javamail Library With Mirth Connect"