Support Questions

Find answers, ask questions, and share your expertise

Convert .MSG to TIFF format

avatar
Explorer

Hi, 
I have email archived in .MSG format files in folder location which is mentioned in SQL database table.

I need to get the file from folder location , read the file , check if there is any attachment in msg file , if yes then need to extract that attachment and make the entry of that file into database table

I am new to NIFI , So anyone can help me with some sample flow for this requirement? 

Thanks In advance , 

Prats 

1 ACCEPTED SOLUTION

avatar
Master Mentor

@pratschavan 

Based on the exception shared it is telling you that the ingested msg files you have do not follow RFC-2822 specification the extractEmailHeader controller service has a requirement.
States that the particular MSG it tried to process was missing the sender.

You may need to write your won customer reader for your formatted MSG files and without, unfortunately I will not be very helpful as it is outside my area of knowledge.

If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

View solution in original post

3 REPLIES 3

avatar
Master Mentor

@pratschavan 

You may find the guidance provided below useful:
https://stackoverflow.com/questions/47200178/read-message-body-of-an-email-using-apache-nifi

Instead of using consumePOP3 processor to get your msg files directly from an email server, you would simply ingest those files from your msg storage folder(s). 

As far as interacting with your SQL DB, there are numerous documented SQL processor:
https://nifi.apache.org/docs/nifi-docs/

If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

avatar
Explorer

Hello @MattWho ,
Thank you for your quick help, I tried your suggestion and I am getting following error to extractEmailHeaders processor, my processor configuration is as follows. could you guide me about this issue.

pratschavan_1-1705294254986.png

 

"javax.mail.MessagingException: Message failed RFC-2822 validation: No Sender"

 

avatar
Master Mentor

@pratschavan 

Based on the exception shared it is telling you that the ingested msg files you have do not follow RFC-2822 specification the extractEmailHeader controller service has a requirement.
States that the particular MSG it tried to process was missing the sender.

You may need to write your won customer reader for your formatted MSG files and without, unfortunately I will not be very helpful as it is outside my area of knowledge.

If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt