Format |
public bool EnsureNewLine { get; set; }
Exception | Condition |
---|---|
InvalidOperationException | Default cannot be changed. |
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.