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.
The immutable(ubyte)[] overload for a single file was added on May 14, 2024.
Various constructors for parsing an email message.