IncomingEmailMessage.this

Various constructors for parsing an email message.

More...
  1. this(immutable(ubyte)[][] mboxLines, bool asmbox)
  2. this(string[] lines)
    class IncomingEmailMessage
    this
    (
    string[] lines
    )
  3. this(immutable(ubyte)[] fileContent)

Detailed Description

The ref immutable(ubyte)[][] one is designed for reading a pre-loaded mbox file. It updates the ref variable to the point at the next message in the file as it processes. You probably should use MboxMessages in a foreach loop instead of calling this directly most the time.

The string[] one takes an ascii or utf-8 file of a single email pre-split into lines.

The immutable(ubyte)[] one is designed for reading an individual message in its own file in the easiest way. Try new IncomingEmailMessage(cast(immutable(ubyte)[]) std.file.read("filename.eml")); to use this. You can also use IncomingEmailMessage.fromFile("filename.eml") as well.

Meta

History

The immutable(ubyte)[] overload for a single file was added on May 14, 2024.