MessageBuilderConfig Class
Provides properties and methods which affect how the mail message is being built from the MailMessage object properties and collections into the message raw data (in MIME format).
Inheritance Hierarchy

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
public class MessageBuilderConfig

The MessageBuilderConfig type exposes the following members.

Public methodCode exampleApply
Rebuilds the message accordingly the current settings.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public propertyCode exampleAddressDelimeter
Gets or sets the character to be used as a delimiter for e-mail addresses.
Public propertyBuildHeaderOnly
Forces MailBee to build only the message header and leave the body section intact.
Public propertyCode exampleHtmlToPlainMode
Gets or sets the condition which triggers automatic conversion of the HTML body of the message into plain-text.
Public propertyHtmlToPlainOptions
Gets or sets the options which affect automatic conversion of the HTML body into plain-text.
Public propertyCode exampleOnReplaceUriWithCid
Gets or sets the delegate to be called whenever MailBee tries to import the resource referenced in the HTML body and replace it with CID.
Public propertyCode exampleRelatedFilesFolder
Gets or sets the path to the folder from which to take the files related to the message.
Public propertyRemoveBccOnSend
Indicates whether BCC header should be removed from the message when it gets sent or submitted to the pickup folder.
Public propertySetDateOnSend
Indicates whether the current date and time should be added to the message at the moment of sending or submitting to the pickup folder.
Public propertySetMessageIDOnSend
Indicates if Message-ID header should be set to a new unique value and added to the message at the moment of sending or submitting to the pickup folder.

This class allows the developer to tune how a new mail message will be generated from MailMessage properties and collections. This may include automatic creation of plain-text version of the HTML body, setting Date and MessageID values, and much more. A new mail message is a message created with MailBee.

To tune how an existing mail message should be being parsed, use MailMessage.Parser property. An existing mail message is a message received from another source (such as file, stream, mail server, etc).

A message can be both existing and new. For instance, if you have received a message from the mail server (this makes this message existing), modified it and are re-sending it again. This will produce a new message (although it's based on another existing message).

Note Note
MessageBuilderConfig object cannot be used on its own. To access its members, use MailMessage.Builder property.
The sample creates a new message, enables automatic creation of the plain-text version of the HTML body, and saves the message to disk.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Mime;

// Create a new MailMessage object.
MailMessage msg = new MailMessage();

// Tell MailBee to create plain-text version of the HMTL body.
msg.Builder.HtmlToPlainMode = HtmlToPlainAutoConvert.IfNoPlain;

// Set the HTML body contents.
msg.BodyHtmlText = @"<html><b>Hello</b>, <i>World</i>!</html>";

// Save the message into a folder. The plain-text version will be
// created at this point along with generating MIME source of the message.
See Also