• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class MboxWriter

Writes MBOX mailbox files (RFC 4155) to a stream. Each message is preceded by a From line and its body is mboxrd-quoted. Always emits CRLF line endings. Not thread-safe.

Inheritance
object
MboxWriter
Implements
IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Mail.Rfc.Mbox
Assembly: DRIT.Mail.dll
Syntax
public sealed class MboxWriter : IDisposable

Constructors

View Source

MboxWriter(Stream)

Initializes a new instance of the MboxWriter class.

Declaration
public MboxWriter(Stream stream)
Parameters
Type Name Description
Stream stream

The stream used to read or write the data.

View Source

MboxWriter(Stream, bool)

Initializes a new instance of the MboxWriter class.

Declaration
public MboxWriter(Stream stream, bool leaveOpen)
Parameters
Type Name Description
Stream stream

The stream used to read or write the data.

bool leaveOpen

The leave open used by the operation.

Methods

View Source

Dispose()

Processes the dispose data.

Declaration
public void Dispose()
View Source

WriteMessage(MimeMessage, MboxFromLine?)

Writes a message. The From line is derived from the message's From/Sender/Return-Path and Date, or from fromLine if provided.

Declaration
public void WriteMessage(MimeMessage message, MboxFromLine? fromLine = null)
Parameters
Type Name Description
MimeMessage message

The message to write.

MboxFromLine fromLine

The From line to use, or null to derive one from the message.

View Source

WriteMessage(MimeMessage, string)

Writes a message with an explicit envelope sender. The timestamp is taken from the message Date, or UtcNow if absent.

Declaration
public void WriteMessage(MimeMessage message, string envelopeSender)
Parameters
Type Name Description
MimeMessage message

The message to write.

string envelopeSender

The envelope sender for the From line.

Implements

IDisposable
  • View Source
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX