Skip to main content
pratschavan
Silver ⭐️
January 12, 2024
Solved

Convert .MSG to TIFF format

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 

MattWho
MattWhoAnswer
Titanium ⭐️⭐️⭐️
January 17, 2024

@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

3 replies

MattWho
Titanium ⭐️⭐️⭐️
Titanium ⭐️⭐️⭐️
January 12, 2024

@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

Translate
pratschavan
Silver ⭐️
January 15, 2024

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"

 

Translate
MattWho
Titanium ⭐️⭐️⭐️
MattWhoAnswer
Titanium ⭐️⭐️⭐️
January 17, 2024

@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

Translate