Compartilhar via


MailTransportBindingElementBase.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 value that determines how a message will be 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 MailTransportBindingElementBase
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
A value that specifies how a message will be 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

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

See Also

Reference

MailTransportBindingElementBase Class

MailTransportBindingElementBase Members

Microsoft.ServiceModel.Channels.Mail Namespace