MessageBuilderConfig Class |
Namespace: MailBee.Mime
The MessageBuilderConfig type exposes the following members.
Name | Description | |
---|---|---|
Apply |
Rebuilds the message accordingly the current settings.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
SetDomainKeysSignOnSend |
Forces MailBee to sign all outgoing e-mail messages with DKIM or DomainKeys signatures.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
AddressDelimeter |
Gets or sets the character to be used as a delimiter for e-mail addresses.
| |
BuildHeaderOnly |
Forces MailBee to build only the message header and leave the body section intact.
| |
HtmlToPlainMode |
Gets or sets the condition which triggers automatic conversion of the HTML body of the message into plain-text.
| |
HtmlToPlainOptions |
Gets or sets the options which affect automatic conversion of the HTML body into plain-text.
| |
KeepEmptyHeaders |
Forces MailBee to include empty headers in the message upon building the message.
| |
OnReplaceUriWithCid |
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.
| |
RelatedAlternativeNestingOrder |
Sets how MailBee should enclose "multipart/related" and "multipart/alternative" MIME part in each other.
| |
RelatedFilesFolder |
Gets or sets the path to the folder from which to take the files related to the message.
| |
RemoveBccOnSend |
Indicates whether BCC header should be removed from the message when it gets sent or submitted to the pickup folder.
| |
SetDateOnSend |
Indicates whether the current date and time should be added to the message at the moment of sending or submitting to the pickup folder.
| |
SetMessageIDOnSend |
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 |
---|
MessageBuilderConfig object cannot be used on its own. To access its members, use MailMessage.Builder property. |
// 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");