Table of Contents

Class EmailAddress

Namespace
Microsoft.Exchange.WebServices.Data
Assembly
Microsoft.Exchange.WebServices.dll

Represents an e-mail address.

public class EmailAddress : ComplexProperty, ISearchStringProvider
Inheritance
EmailAddress
Implements
Derived
Inherited Members

Constructors

EmailAddress()

Initializes a new instance of the EmailAddress class.

public EmailAddress()

EmailAddress(string)

Initializes a new instance of the EmailAddress class.

public EmailAddress(string smtpAddress)

Parameters

smtpAddress string

The SMTP address used to initialize the EmailAddress.

EmailAddress(string, string)

Initializes a new instance of the EmailAddress class.

public EmailAddress(string name, string smtpAddress)

Parameters

name string

The name used to initialize the EmailAddress.

smtpAddress string

The SMTP address used to initialize the EmailAddress.

EmailAddress(string, string, string)

Initializes a new instance of the EmailAddress class.

public EmailAddress(string name, string address, string routingType)

Parameters

name string

The name used to initialize the EmailAddress.

address string

The address used to initialize the EmailAddress.

routingType string

The routing type used to initialize the EmailAddress.

Properties

Address

Gets or sets the actual address associated with the e-mail address. The type of the Address property must match the specified routing type. If RoutingType is not set, Address is assumed to be an SMTP address.

public string Address { get; set; }

Property Value

string

Id

Gets or sets the Id of the contact the e-mail address represents. When Id is specified, Address should be set to null.

public ItemId Id { get; set; }

Property Value

ItemId

MailboxType

Gets or sets the type of the e-mail address.

public MailboxType? MailboxType { get; set; }

Property Value

MailboxType?

Name

Gets or sets the name associated with the e-mail address.

public string Name { get; set; }

Property Value

string

RoutingType

Gets or sets the routing type associated with the e-mail address. If RoutingType is not set, Address is assumed to be an SMTP address.

public string RoutingType { get; set; }

Property Value

string

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

implicit operator EmailAddress(string)

Defines an implicit conversion between a string representing an SMTP address and EmailAddress.

public static implicit operator EmailAddress(string smtpAddress)

Parameters

smtpAddress string

The SMTP address to convert to EmailAddress.

Returns

EmailAddress

An EmailAddress initialized with the specified SMTP address.