Click or drag to resize
MimeKit

FormatOptionsEnsureNewLine Property

Get or set whether the formatter should ensure that messages end with a new-line sequence.

Namespace:  MimeKit
Assembly:  MimeKit (in MimeKit.dll) Version: 3.0.0
Syntax
C#
public bool EnsureNewLine { get; set; }

Property Value

Type: Boolean
true in order to ensure that the message will end with a new-line sequence; otherwise, false.
Exceptions
ExceptionCondition
InvalidOperationExceptionDefault cannot be changed.
Remarks

By default, when writing a MimeMessage to a stream, the serializer attempts to maintain byte-for-byte compatibility with the original stream that the message was parsed from. This means that if the ogirinal message stream did not end with a new-line sequence, then the output of writing the message back to a stream will also not end with a new-line sequence.

To override this behavior, you can set this property to true in order to ensure that writing the message back to a stream will always end with a new-line sequence.

See Also