Mailbox Class

Used to represent a Mailbox element which is used to identify a mail- enabled Active Directory object. http://msdn.microsoft.com/en-us/library/aa565036%28v=EXCHG.140%29.aspx

Constructors

Mailbox( String name, EmailAddress email )
Mailbox( String name, String email )
Mailbox( Contact contact )

Public Methods

getEmailAddress( ) returns EmailAddress
Returns the EmailAddress associated with this Mailbox, or null if the EmailAddress is undefined.
setEmailAddress( EmailAddress emailAddress ) returns void
Used to set/update the EmailAddress associated with this Mailbox.
setEmailAddress( String emailAddress ) returns void
Used to set/update the EmailAddress associated with this Mailbox.
getDomainAddress( ) returns String
Returns a string used to represent an email address of another Exchange account within your domain (e.g. "/o=org/ou=orgunit/cn=Recipients/cn=name"). The domain address can be resolved to an email address using the resolveName() method.
getName( ) returns String
Returns the display name associated with this Mailbox (e.g. "John Smith").
getID( ) returns String
toString( ) returns String
Returns a string representation of this Mailbox (e.g. "John Smith <jsmith@acme.com>").
equals( Object obj ) returns boolean
Used to compare this Mailbox to another. Returns true if the hashcodes match.
hashCode( ) returns int
Returns the hashcode associated with the EmailAddress. If the EmailAddress is undefined, returns the hashcode of the domain address. If both the EmailAddress and domain address are undefined, returns 0.

Static Methods

resolveName( String name, Connection conn ) returns Mailbox
Attempts to resolve a user name, email address, or a domain address to a Mailbox.