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
stringThe 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
stringThe name used to initialize the EmailAddress.
smtpAddress
stringThe 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
stringThe name used to initialize the EmailAddress.
address
stringThe address used to initialize the EmailAddress.
routingType
stringThe 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
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
MailboxType
Gets or sets the type of the e-mail address.
public MailboxType? MailboxType { get; set; }
Property Value
Name
Gets or sets the name associated with the e-mail address.
public string Name { get; set; }
Property Value
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
Methods
ToString()
public override string ToString()
Returns
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
stringThe SMTP address to convert to EmailAddress.
Returns
- EmailAddress
An EmailAddress initialized with the specified SMTP address.