Reputation: 2152
I am having webmail access to IBM Lotus Notes and wanted to export the emails from the webclient. Since there is no tool provided by the company, I have decided to create a tool mechanism to export the important mails in EML format. I have access to the MIME message for each email, as shown in the screen shot below.
What I want to figure out is how to convert this MIME information to EML format. I saved the MIME message initially directly as a text file with EML as the extension and it works for the mail part to certain extent but the attachements are not shown correctly. I wanted to know if the conversion from the MIME to EML is possible via tool or by programming. I have checked in Go language , Perl and Java but couldn't figure out have to convert raw MIME to EML.
Thanks.
Upvotes: 1
Views: 5223
Reputation: 55443
The problem as stated does not really exist.
What your webmail software calls "MIME format" is misleading. In fact, this view merely renders the mail message "as is", "raw" (as it's transferred over the wire by mail agents).
The set of RFCs defining that "MIME" stuff merely sets a set of conventions on how to format e-mail messages in order for them to contain non-ASCII text, multiple parts etc. They hence augment what was originally defined by RFC 822.
To explain it in more simple words: mail user agents (including your webmail software) usually parse each message, interpret its headers and payload parts and present your with a high-level presentation of the information extracted from the message. This particular view you demonstrated merely renders the "source" of the message—as it's stored on the mail server.
Now, the "EML format" is, again, misleading: a file in this "format" merely contains "raw" e-mail message.
Hence to create a mail message in "EML format" out of what your webmail gives you, all you need to do is:
Now try opening that file with any piece of software which is able to "import" (or render) files in "EML format" to make sure all the message's data is there (Sylpheed can do that for sure).
Hence your programmatic soultion would be fetching that "raw" data from your webmail and saving it as is into text files.
Upvotes: 3