Click or drag to resize

MailMergeMessage Class

Represents an email message that can be sent using the MailMergeLib.MailMergeSender class.
Inheritance Hierarchy
SystemObject
  MailMergeLibMailMergeMessage

Namespace:  MailMergeLib
Assembly:  MailMergeLib (in MailMergeLib.dll) Version: 5.6.1.0
Syntax
public class MailMergeMessage : IDisposable

The MailMergeMessage type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyConfig
The settings for a MailMergeMessage.
Public propertyFileAttachments
Gets or sets files that will be attached to a mail message. File names may contain placeholders.
Public propertyHeaders
Gets or sets the user defined headers of a mail message.
Public propertyHtmlText
Gets or sets the mail message HTML content.
Public propertyInfo
Information about the MailMergeMessage
Public propertyInlineAttachments
Gets inline attachments (linked resources of the HTML body) of a mail message. They are generated automatically with all image sources pointing to local files. For adding non-automatic inline attachments, use AddExternalInlineAttachment(FileAttachment) ONLY.
Public propertyMailMergeAddresses
Gets the collection of recipients and sender addresses of the message. If the collection contains an address of type TestAddress, then all recipient addresses of the collection will be replaced with the mailbox address of the test address.
Public propertyPlainText
Gets or sets the mail message plain text content.
Public propertySmartFormatter
Gets or sets the instance of the MailSmartFormatter (derived from SmartFormat.NET's SmartFormatter) which will be used with MailMergeLib.
Public propertyStreamAttachments
Gets or sets streams that will be attached to a mail message.
Public propertyStringAttachments
Gets or sets string attachments that will be attached to a mail message. String attachments can be text or binary.
Public propertySubject
Gets or sets the mail message subject.
Public propertyTemplates
Gets a collection of type Templates. Templates can be part of PlainText or HtmlText.
Top
Methods
  NameDescription
Public methodAddExternalInlineAttachment
Adds external inline attachments (linked resources of the HTML body) of a mail message. They are normally generated automatically with all image sources pointing to local files, but with this method such files can be added as well.
Public methodClearExternalInlineAttachment
Clears external inline attachments (linked resources of the HTML body) of a mail message. They are normally generated automatically with all image sources pointing to local files. This method only removes attachments formerly added with AddExternalInlineAttachment.
Public methodConvertHtmlToPlainText
Converts the HtmlText into plain text (without tags or html entities) and writes it to the PlainText property.
Public methodStatic memberDeserialize(String)
Reads a message from an xml string.
Public methodStatic memberDeserialize(Stream, Encoding)
Reads a message from an xml stream.
Public methodStatic memberDeserialize(String, Encoding)
Reads message from an xml file.
Public methodDispose
Dispose MailMergeMessage
Public methodStatic memberDisposeFileStreams
Dispose the streams of file attachments and HTML inline file attachments, so that files are fully accessible again
Public methodEquals(Object) (Overrides ObjectEquals(Object).)
Public methodEquals(MailMergeMessage)
Compares the MailMergeMessage with an other instance of MailMergeMessage for equality.
Protected methodEquals(HeaderList, HeaderList)
Protected methodEquals(HashSetFileAttachment, HashSetFileAttachment)
Protected methodEquals(HashSetStringAttachment, HashSetStringAttachment)
Protected methodFinalize
Destructor.
(Overrides ObjectFinalize.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetMimeMessage
Gets the MimeMessage representation of the MailMergeMessage for a specific data item.
Public methodGetMimeMessagesT
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.)
Protected methodSearchAndReplaceVars
Replaces all variables in the text with their corresponding values. Used for subject, body and attachment.
Protected methodSearchAndReplaceVarsInFilename
Replaces all variables in the text with their corresponding values. Filenames may contain backslashes which may not be interpreted as literals. That's why "ConvertCharacterStringLiterals" must be false in this method. Uses new instances of MailSmartFormatter and SmartFormatterConfig.
Public methodSerialize
Get the message as a serialized XML string.
Public methodSerialize(Stream, Encoding)
Write a message to an XML stream.
Public methodSerialize(String, Encoding)
Write message to an XML file.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also