MailBindingBase.MessageContainerType Property
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets or sets an enumeration that determines how the message is sent.
Namespace: Microsoft.ServiceModel.Channels.Mail
Assembly: Microsoft.ServiceModel.Channels.Mail (in Microsoft.ServiceModel.Channels.Mail.dll)
Syntax
'Declaration
Public Property MessageContainerType As MessageContainerType
Get
Set
'Usage
Dim instance As MailBindingBase
Dim value As MessageContainerType
value = instance.MessageContainerType
instance.MessageContainerType = value
public MessageContainerType MessageContainerType { get; set; }
public:
property MessageContainerType MessageContainerType {
MessageContainerType get ();
void set (MessageContainerType value);
}
member MessageContainerType : MessageContainerType with get, set
Property Value
Type: Microsoft.ServiceModel.Channels.Mail.MessageContainerType
One of the enumeration values that specifies how the message data is sent.
Remarks
If the MessageContainerType property is set to Default, the MinimumAttachmentSize property determines whether a message is sent in the message body or as an attachment.
Examples
The following example shows how to use the MessageContainerType property.
' 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;
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
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