Archived Forum Post

Index of archived forum posts

Question:

Feature Request: Add Email.LoadEmlString, just like Email.LoadXmlString

Apr 03 '13 at 07:56

Currently it is possible to get a xml string from an Email object, and then to load from that xml string without any file system I/O: Email.GetXml() and then Email.LoadXmlString(string xmlStr)

I would like to ask to have the same capability for .eml files: Email.GetEml() and then Email.LoadEmailString(string emlStr). Right now, I have to use Email.SaveEml(string filename) and then Email.LoadEml(string mimeFilename), which require me to use a temporary filename which is not satisfactory.

Thanks, Alon.


Accepted Answer

The functionality is already there. To load an Email object from a MIME string, call Email.SetFromMimeText (or SetFromMimeBytes to load from a MIME byte array -- if the MIME contains unencoded binary content).