On Monday, 9 April 2018 at 18:47:16 UTC, bachmeier wrote:
Is there a way to do this in D? The email libraries I've found
don't appear to work with .eml.
My understanding is .eml is the same MIME format the email itself
and mbox and maildir all use.
So any of those libraries are likely to work with it.
You should open the eml file in Notepad or whatever and see if
there are more than one message in it. If so, my email.d can
handle is mbox
just `cast(immutable(ubyte)) std.file.read` the file to get
Otherwise, my email.d would do it as an individual message you
can construct with this:
just std.file.readText and splitLines to get the string array.
my email.d is here
https://github.com/adamdruppe/arsd/blob/master/email.d it depends
on dom.d htmltotext.d and characterencodings.d
or on dub http://code.dlang.org/packages/arsd-official%3Aemail