MailMessageReset Method
Resets all the properties of the MailMessage object to the default values.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public void Reset()
Remarks

This method allows processing multiple messages without re-creating MailMessage object for every message.

All information contained in the fields of the MailMessage object will be lost after using this method. Also, this method will delete any temporary files which could have been earlier created for this MailMessage object: although MailBee parses messages in memory, the developer may explicitly request automatic saving of the message as HTML file with MailMessage.Parser.AutoSaveHtmlMode property or using GetHtmlAndSaveRelatedFiles(String, VirtualMappingType, MessageFolderBehavior) method. Such temporary files are deleted by the object destructor and by Reset and Dispose methods.

Examples
This sample loads the message from .EML file, shows its subject, resets the message and displays the subject again (it will be empty value second time).
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Mime;

// The actual code (put it into a method of your class).
MailMessage msg = new MailMessage();
msg.LoadMessage(@"C:\Docs\TestMail.eml");
Console.WriteLine(msg.Subject);
msg.Reset();
Console.WriteLine(msg.Subject);
See Also