MailBindingBase.MinimumAttachmentSize Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets or sets a size threshold that determines whether a message will be sent in the message body or as an attachment.

Namespace:  Microsoft.ServiceModel.Channels.Mail
Assembly:  Microsoft.ServiceModel.Channels.Mail (in Microsoft.ServiceModel.Channels.Mail.dll)

Syntax

'Declaration
Public Property MinimumAttachmentSize As Integer
    Get
    Set
'Usage
Dim instance As MailBindingBase
Dim value As Integer

value = instance.MinimumAttachmentSize

instance.MinimumAttachmentSize = value
public int MinimumAttachmentSize { get; set; }
public:
property int MinimumAttachmentSize {
    int get ();
    void set (int value);
}
member MinimumAttachmentSize : int with get, set

Property Value

Type: System.Int32
The message size threshold, in bytes. If the message size is larger than this value, the message is sent as an attachment. Otherwise, the message is sent in the message body.

Remarks

The default size threshold is 2,048 bytes.

This property is used only if the MessageContainerType property is set to Default.

For Windows Mobile devices, the Microsoft ActiveSync e-mail synchronization settings control the maximum size of each message that is initially downloaded to the device. If a message exceeds this size, only a part of the message body is downloaded first. If a message is partially downloaded and a channel listener is waiting for the message, the transport marks the message to indicate that it has to be downloaded. The full message is downloaded at the next synchronization session.

Examples

The following example shows how to use the MinimumAttachmentSize property. In this example, messages larger than 1,024 bytes will be sent as attachments.

' For a desktop application, use ExchangeWebServiceMailBinding.
binding = New WindowsMobileMailBinding()

binding.MinimumAttachmentSize = 1024
// For a desktop application, use ExchangeWebServiceMailBinding.
binding = new WindowsMobileMailBinding();

binding.MinimumAttachmentSize = 1024;

.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

MailBindingBase Class

MailBindingBase Members

Microsoft.ServiceModel.Channels.Mail Namespace