Partager via


MailUriHelper.Create Method (String, array<String[])

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

Creates a mail Uniform Resource Identifier (URI) based on a specified channel and a set of e-mail addresses.

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

Syntax

'Declaration
Public Shared Function Create ( _
    channelName As String, _
    emailAddresses As String() _
) As String
'Usage
Dim channelName As String
Dim emailAddresses As String()
Dim returnValue As String

returnValue = MailUriHelper.Create(channelName, _
    emailAddresses)
public static string Create(
    string channelName,
    string[] emailAddresses
)
public:
static String^ Create(
    String^ channelName, 
    array<String^>^ emailAddresses
)
static member Create : 
        channelName:string * 
        emailAddresses:string[] -> string 

Parameters

  • channelName
    Type: System.String
    The channel name to use in the mail URI. Do not use the following characters in the channel name: number sign (#), equal sign (=), semicolon (;), or space (" ").
  • emailAddresses
    Type: array<System.String[]
    An array that contains the e-mail addresses to use in the mail URI. Display names are not supported in e-mail addresses. An example of a valid e-mail address is "someone@example.com".

Return Value

Type: System.String
The mail URI that is created.

Exceptions

Exception Condition
ArgumentException

The channel name or e-mail addresses are formatted incorrectly or contain invalid characters.

Remarks

This method creates a mail URI in the following format:

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

The e-mail address is used only by the output channel.

Examples

For an example that shows how to use this method with a single e-mail address, see the Create(String, String) method overload.

.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

MailUriHelper Class

MailUriHelper Members

Create Overload

Microsoft.ServiceModel.Channels.Mail Namespace