Gets or sets the transport that will be used by the input and output channels to receive and send messages.
Assembly: Microsoft.ServiceModel.Channels.Mail (in Microsoft.ServiceModel.Channels.Mail.dll)
The MailTransport class manages the communication channel for each mail endpoint.
The mail transport must be disposed when you close the application.
You have to set the mail transport if you are using one mail transport for multiple bindings.
The following example shows how to use the property to dispose the mail transport.
// For a desktop application, use ExchangeWebServiceMailBinding. binding = new WindowsMobileMailBinding(); binding.MinimumAttachmentSize = 1024; // Set lifetime to 1 day, 10 hours, 20 minutes, and 30 seconds. binding.TimeToLive = new TimeSpan(1, 10, 20, 30); binding.Transport.ReceiveRetryCount = 5;
- 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.
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.