MessageContainerType Enumeration
Specifies how the message data is sent by the channel.
Assembly: Microsoft.ServiceModel.Channels.Mail (in Microsoft.ServiceModel.Channels.Mail.dll)
| 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. |
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.
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
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.
