Answer the question
In order to leave comments, you need to log in
Parsing EML (MIME) - code, ready-made solution or add. information?
Colleagues,
I have a task:
in batch mode, remove attachments from a large number of eml files, with their original attachments, names.
Tried the uudeview port under Windows ( https://github.com/maiken2051/uudeview ) but it doesn't save filenames correctly. I wrote to the developer, he promised to fix it, but after a while.
While I wait, I decided to try it myself. I took the code https://github.com/erikvdv1/eml-attachments , but it does not work with encodings at all.
Undertook to edit and found a bunch of oddities in the MIME standard. Line breaks, including double ones, can occur anywhere at all, and \t;
I met at least two variants of charset fields (charset="" and charset=*; );
in the filename fields, too, what kind of nonsense does not happen;
with boundary too problems.
Rhetorical question: how is this called a standard at all?
The main question is: has anyone come across a working code / project that takes into account all these strange nuances? And then I have the feeling that I am writing a bicycle, and even not very successfully.
Answer the question
In order to leave comments, you need to log in
In short, I wrote it myself.
https://github.com/automatize-it/eml-attachments
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question