public class MailAddress extends Object implements IMailAddress
Represents the address of a message.
Constructor and Description |
---|
MailAddress(String address)
Initializes a new instance of the
MailAddress class. |
MailAddress(String address,
boolean ignoreSmtpCheck)
Initializes a new instance of the
MailAddress class. |
MailAddress(String address,
String displayName)
Initializes a new instance of the
MailAddress class. |
MailAddress(String address,
String displayName,
boolean ignoreSmtpCheck)
Initializes a new instance of the
MailAddress class. |
MailAddress(String address,
String displayName,
Charset displayNameEncoding) |
MailAddress(String address,
String displayName,
Charset displayNameEncoding,
boolean ignoreSmtpCheck) |
Modifier and Type | Method and Description |
---|---|
void |
add(MailAddress address)
Deprecated.
|
boolean |
equals(Object value)
Determines whether the specified
System.Object is equal to this instance. |
MailAddress |
get_Item(int i)
Gets the element at the specified index.
|
String |
getAddress()
Gets or sets the e-mail address.
|
int |
getCount()
Contains count of mail addresses.
|
String |
getDisplayName()
Gets or sets a display name.
|
String |
getHost()
Gets the host portion of the address.
|
String |
getUser()
Gets the username.
|
int |
hashCode()
Returns a hash code for this instance.
|
void |
setAddress(String value) |
void |
setDisplayName(String value) |
static MailAddress |
toMailAddress(MailAddressCollection addresses)
Performs an implicit conversion from
Aspose.Email.Mail.MailAddressCollection to Aspose.Email.Mail.MailAddress . |
static MailAddress |
toMailAddress(String address)
Performs an implicit conversion from
System.String to Aspose.Email.Mail.MailAddress . |
String |
toString()
Returns a
System.String that represents this instance. |
public MailAddress(String address, boolean ignoreSmtpCheck)
Initializes a new instance of the MailAddress
class.
address
- The mail address.ignoreSmtpCheck
- if set to true
then SMTP check will be omitted.public MailAddress(String address, String displayName, boolean ignoreSmtpCheck)
Initializes a new instance of the MailAddress
class.
address
- The mail address.displayName
- The display name.ignoreSmtpCheck
- if set to true
then SMTP check will be omitted.public MailAddress(String address, String displayName, Charset displayNameEncoding, boolean ignoreSmtpCheck)
public MailAddress(String address)
Initializes a new instance of the MailAddress
class.
address
- The mail address.public String getDisplayName()
Gets or sets a display name.
Value: A String that contains the display name.getDisplayName
in interface IMailAddress
public void setDisplayName(String value)
setDisplayName
in interface IMailAddress
public String getUser()
Gets the username.
Value: A String that contains the user name.public String getHost()
Gets the host portion of the address.
Value: A String that contains the name of the host.public String getAddress()
Gets or sets the e-mail address.
Value: A String that contains the e-mail address.getAddress
in interface IMailAddress
public void setAddress(String value)
setAddress
in interface IMailAddress
public int getCount()
Contains count of mail addresses.
public MailAddress get_Item(int i)
Gets the element at the specified index.
i
- The zero-based index of the element to get or set.public static MailAddress toMailAddress(String address)
Performs an implicit conversion from System.String
to Aspose.Email.Mail.MailAddress
.
address
- The address.public static MailAddress toMailAddress(MailAddressCollection addresses)
Performs an implicit conversion from Aspose.Email.Mail.MailAddressCollection
to Aspose.Email.Mail.MailAddress
.
addresses
- The address collection.public String toString()
Returns a System.String
that represents this instance.
public boolean equals(Object value)
Determines whether the specified System.Object
is equal to this instance.
public int hashCode()
Returns a hash code for this instance.
@Deprecated public void add(MailAddress address)
Adds the specified address.
address
- The address.Copyright (c) 2008-2014 Aspose Pty Ltd. All Rights Reserved.