Table of Contents

Class Mailbox

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

Represents a mailbox reference.

public class Mailbox : ComplexProperty, ISearchStringProvider
Inheritance
Mailbox
Implements
Inherited Members

Constructors

Mailbox()

Initializes a new instance of the Mailbox class.

public Mailbox()

Mailbox(string)

Initializes a new instance of the Mailbox class.

public Mailbox(string smtpAddress)

Parameters

smtpAddress string

The primary SMTP address of the mailbox.

Mailbox(string, string)

Initializes a new instance of the Mailbox class.

public Mailbox(string address, string routingType)

Parameters

address string

The address used to reference the user mailbox.

routingType string

The routing type of the address used to reference the user mailbox.

Properties

Address

Gets or sets the address used to refer to the user mailbox.

public string Address { get; set; }

Property Value

string

IsValid

True if this instance is valid, false otherthise.

public bool IsValid { get; }

Property Value

bool

true if this instance is valid; otherwise, false.

RoutingType

Gets or sets the routing type of the address used to refer to the user mailbox.

public string RoutingType { get; set; }

Property Value

string

Methods

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Exceptions

NullReferenceException

The obj parameter is null.

GetHashCode()

Serves as a hash function for a particular type.

public override int GetHashCode()

Returns

int

A hash code for the current object.

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 Mailbox(string)

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

public static implicit operator Mailbox(string smtpAddress)

Parameters

smtpAddress string

The SMTP address to convert to EmailAddress.

Returns

Mailbox

A Mailbox initialized with the specified SMTP address.