MessageContainerType Enumeration
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Specifies how the message data is sent by the channel.
Namespace: Microsoft.ServiceModel.Channels.Mail
Assembly: Microsoft.ServiceModel.Channels.Mail (in Microsoft.ServiceModel.Channels.Mail.dll)
Syntax
'Declaration
Public Enumeration MessageContainerType
'Usage
Dim instance As MessageContainerType
public enum MessageContainerType
public enum class MessageContainerType
type MessageContainerType
Members
Member name | Description | |
---|---|---|
Default | The MinimumAttachmentSize property is used to determine whether the message will be sent in the e-mail message body or as an attachment. This is the default value. | |
Body | The message is sent in the e-mail message body regardless of the message size. | |
Attachment | The message is sent as an e-mail attachment regardless of the message size. |
Remarks
When the encoding element is TextMessageEncodingBindingElement, all enumeration members are supported. However, custom encoders must use the Attachment member.
It is typically more efficient to download larger messages as attachments, and download smaller messages in the message body. For the most precise control over how the message is sent, use the Default member and set the MinimumAttachmentSize property.
Examples
The following example shows how to use the MessageContainerType enumeration.
' Instantiate a TextMessageEncodingBindingElement or
' a custom encoding binding element. If you use a custom encoding
' binding element, messages must be sent as attachments.
msgEncodingBindingElement = New CustomMessageEncodingBindingElement()
mailTransportBindingElement = New WindowsMobileMailTransportBindingElement()
mailTransportBindingElement.MessageContainerType = MessageContainerType.Attachment
// Instantiate a TextMessageEncodingBindingElement or
// a custom encoding binding element. If you use a custom encoding
// binding element, messages must be sent as attachments.
msgEncodingBindingElement = new CustomMessageEncodingBindingElement();
mailTransportBindingElement = new WindowsMobileMailTransportBindingElement();
mailTransportBindingElement.MessageContainerType = MessageContainerType.Attachment;
Platforms
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Compact Framework
Supported in: 3.5