https://learninghub.kx.com/forums/topic/how-to-download-attachments-from-eml-file
How to download attachments from *.eml file using kdb code?
https://learninghub.kx.com/forums/topic/how-to-download-attachments-from-eml-file
How to download attachments from *.eml file using kdb code?
Here I’m going to suggest you download attachments from the .eml file with the help of the EML Attachment Extractor Tool For users who want to download many attachments from EML and EMLX files, this is the most effective and user-friendly solution available. The program works well because users expect quick operation and error-free management of large files or data. This tool can be used to extract attachments from saved email EML files. Users only need to follow a few easy steps to open and remove the attachments. With this tool, you can extract CC, BCC, topic lines, and other types of data. Thunderbird, Windows Live Mail, and other eM clients are among the EML email clients with which it is compatible. Extracting attachments is easy on any Windows computer. Download the free to access additional features.
Read More: www.softakensoftware.com/eml-attachment-remover.html
To download attachments from an *.eml file manually, you can open the file in an email client like Outlook or Thunderbird, then open the email and save the attachments individually. However, this process can be time-consuming, especially for multiple emails.
Alternatively, you can use Advik EML Converter to extract attachments from *.eml files in bulk. This tool simplifies the process and saves you time by automatically extracting attachments from multiple *.eml files at once.
Kdb+ can parse binary files as nicely shown at the recent KX meetup by
https://community.kx.com/t5/Events/KX-Community-Meetup-New-York/ba-p/13880
File formats can get complicated though so this can be a lot of work.
If I wanted to do this task quickly I would either:
a) Use a system call to a command line tool to extract the files on disk and then read them in from there.
Writing them to current directory or using mktemp command to write in /var/tmp
b) Wrap some exiting python code using EmbedPy to extract the email and attachments to JSON and read in to kdb+ this way.
Similar to how I did for XML with https://github.com/rianoc/qXML
Some discussions on the topic in Python world:
(Note: I have not tested these for functionality or safety)
Hi KPC,
Looking at an example .eml file here. If you wanted to parse the attachments purely in KDB/Q without the use of Python libs (although I suggest using Python libs) I’d suggest something along the lines of: