This documentation is archived and is not being maintained.

MailUriHelper Class

Visual Studio 2008

Provides helper functions for creating mail Uniform Resource Identifiers (URIs) or accessing data from mail URIs.

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

public sealed class MailUriHelper

The mail URI includes a channel name and an e-mail address. The mail URI is based on the following format:

net.mail://<channel-name>#<e-mail-address-1>;...;<e-mail-address-n>

NoteNote:

This class is included with the .NET Compact Framework version 3.5, but it requires either the .NET Compact Framework 3.5 or the .NET Framework version 3.0 or later at run time.

The following example shows how to use the MailUriHelper class to create Uri objects. The URIs are used as parameters in calls to the BuildChannelListener and CreateChannel methods.

bpc = new BindingParameterCollection();

factory = binding.BuildChannelFactory<IOutputChannel>(bpc);
listener = binding.BuildChannelListener<IInputChannel>(MailUriHelper.CreateUri(ChannelName, ""), bpc);

factory.Open();
output = factory.CreateChannel(new EndpointAddress(MailUriHelper.Create(ChannelName, DestinationEmailAddress)));

System.Object
  Microsoft.ServiceModel.Channels.Mail.MailUriHelper

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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.

.NET Compact Framework

Supported in: 3.5
Show: