Created 01-11-2024 11:42 PM
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
Created 01-17-2024 07:32 AM
@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
Created 01-12-2024 06:46 AM
@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
Created 01-14-2024 08:51 PM
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.
"javax.mail.MessagingException: Message failed RFC-2822 validation: No Sender"
Created 01-17-2024 07:32 AM
@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