MailMessageSerialize Method (String)
Saves the message into the specified .XML file.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public bool Serialize(
	string filename
)

Parameters

filename
Type: SystemString
The path to the .XML file to be saved.

Return Value

Type: Boolean
true if the message was successfully saved to .XML file; otherwise, false.
Exceptions
ExceptionCondition
MailBeeInvalidArgumentExceptionfilename is a null reference (Nothing in Visual Basic) or an empty string.
MailBeeIOExceptionAn I/O error occurred and ThrowExceptions is true.
Remarks
The saved message can be loaded back with Deserialize(String) method.
Examples
The example is available in Deserialize(XmlReader) method documentation.
See Also