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
SystemObject
  MailBee.MimeMessageBuilderConfig

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public class MessageBuilderConfig

The MessageBuilderConfig type exposes the following members.

Methods
  NameDescription
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 methodSetDomainKeysSignOnSend
Forces MailBee to sign all outgoing e-mail messages with DKIM or DomainKeys signatures.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
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 propertyKeepEmptyHeaders
Forces MailBee to include empty headers in the message upon building the message.
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 propertyRelatedAlternativeNestingOrder
Sets how MailBee should enclose "multipart/related" and "multipart/alternative" MIME part in each other.
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.
Top
Remarks

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.
Examples
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.
msg.SaveMessage(@"C:\Temp\TestMail.eml");
See Also