MailAddress

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.email.IMailAddress

public class MailAddress implements IMailAddress

Represents the address of a message.

Constructors

Constructor Description
MailAddress(String address, boolean ignoreSmtpCheck) 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) Initializes a new instance of the MailAddress class.
MailAddress(String address, String displayName, Charset displayNameEncoding, boolean ignoreSmtpCheck) Initializes a new instance of the MailAddress class.
MailAddress(String address) Initializes a new instance of the MailAddress class.
MailAddress(String address, String displayName) Initializes a new instance of the MailAddress class.

Methods

Method Description
getDisplayName() Gets or sets a display name.
setDisplayName(String value) Gets or sets a display name.
getUser() Gets the username.
getHost() Gets the host portion of the address.
getAddress() Gets or sets the e-mail address.
setAddress(String value) Gets or sets the e-mail address.
getOriginalAddressString() Gets or sets the original e-mail address string.
getCount() Contains count of mail addresses.
get_Item(int i) Gets the element at the specified index.
getParticipationStatus() Gets or sets the participation status for the calendar user.
setParticipationStatus(int value) Gets or sets the participation status for the calendar user.
getId() Gets object identification information
to_MailAddress(String address) Performs an implicit conversion from String to MailAddress.
to_MailAddress(MailAddressCollection addresses) Performs an implicit conversion from MailAddressCollection to MailAddress.
toString() Returns a String that represents this instance.
equals(Object obj) Determines whether the specified Object is equal to this instance.
hashCode() Returns a hash code for this instance.

MailAddress(String address, boolean ignoreSmtpCheck)

public MailAddress(String address, boolean ignoreSmtpCheck)

Initializes a new instance of the MailAddress class.

Parameters:

Parameter Type Description
address java.lang.String The mail address.
ignoreSmtpCheck boolean if set to ``` true ``` then SMTP check will be omitted.

MailAddress(String address, String displayName, boolean ignoreSmtpCheck)

public MailAddress(String address, String displayName, boolean ignoreSmtpCheck)

Initializes a new instance of the MailAddress class.

Parameters:

Parameter Type Description
address java.lang.String The mail address.
displayName java.lang.String The display name.
ignoreSmtpCheck boolean if set to ``` true ``` then SMTP check will be omitted.

MailAddress(String address, String displayName, Charset displayNameEncoding)

public MailAddress(String address, String displayName, Charset displayNameEncoding)

Initializes a new instance of the MailAddress class.

Parameters:

Parameter Type Description
address java.lang.String The mail address.
displayName java.lang.String The display name.
displayNameEncoding java.nio.charset.Charset The display name encoding.

MailAddress(String address, String displayName, Charset displayNameEncoding, boolean ignoreSmtpCheck)

public MailAddress(String address, String displayName, Charset displayNameEncoding, boolean ignoreSmtpCheck)

Initializes a new instance of the MailAddress class.

Parameters:

Parameter Type Description
address java.lang.String The mail address.
displayName java.lang.String The display name.
displayNameEncoding java.nio.charset.Charset The display name encoding.
ignoreSmtpCheck boolean if set to ``` true ``` then SMTP check will be omitted.

MailAddress(String address)

public MailAddress(String address)

Initializes a new instance of the MailAddress class.

Parameters:

Parameter Type Description
address java.lang.String The mail address.

MailAddress(String address, String displayName)

public MailAddress(String address, String displayName)

Initializes a new instance of the MailAddress class.

Parameters:

Parameter Type Description
address java.lang.String The mail address.
displayName java.lang.String The display name.

getDisplayName()

public final String getDisplayName()

Gets or sets a display name.

Value: A String that contains the display name.

Returns: java.lang.String

setDisplayName(String value)

public final void setDisplayName(String value)

Gets or sets a display name.

Value: A String that contains the display name.

Parameters:

Parameter Type Description
value java.lang.String

getUser()

public final String getUser()

Gets the username.

Value: A String that contains the user name.

Returns: java.lang.String

getHost()

public final String getHost()

Gets the host portion of the address.

Value: A String that contains the name of the host.

Returns: java.lang.String

getAddress()

public final String getAddress()

Gets or sets the e-mail address.

Value: A String that contains the e-mail address.

Returns: java.lang.String

setAddress(String value)

public final void setAddress(String value)

Gets or sets the e-mail address.

Value: A String that contains the e-mail address.

Parameters:

Parameter Type Description
value java.lang.String

getOriginalAddressString()

public final String getOriginalAddressString()

Gets or sets the original e-mail address string.

Value: A String that contains the original e-mail address.

Returns: java.lang.String

getCount()

public final int getCount()

Contains count of mail addresses.

Returns: int

get_Item(int i)

public final MailAddress get_Item(int i)

Gets the element at the specified index.

Parameters:

Parameter Type Description
i int The zero-based index of the element to get or set.

Returns: MailAddress - Returns the element at the specified index.

getParticipationStatus()

public final int getParticipationStatus()

Gets or sets the participation status for the calendar user.

Returns: int

setParticipationStatus(int value)

public final void setParticipationStatus(int value)

Gets or sets the participation status for the calendar user.

Parameters:

Parameter Type Description
value int

getId()

public final ObjectIdentifier getId()

Gets object identification information

Returns: ObjectIdentifier

to_MailAddress(String address)

public static MailAddress to_MailAddress(String address)

Performs an implicit conversion from String to MailAddress.

Parameters:

Parameter Type Description
address java.lang.String The address.

Returns: MailAddress - The result of the conversion.

to_MailAddress(MailAddressCollection addresses)

public static MailAddress to_MailAddress(MailAddressCollection addresses)

Performs an implicit conversion from MailAddressCollection to MailAddress.

Parameters:

Parameter Type Description
addresses MailAddressCollection The address collection.

Returns: MailAddress - The result of the conversion.

toString()

public String toString()

Returns a String that represents this instance.

Returns: java.lang.String - A String that represents this instance.

equals(Object obj)

public boolean equals(Object obj)

Determines whether the specified Object is equal to this instance.

Parameters:

Parameter Type Description
obj java.lang.Object The Object to compare with this instance.

Returns: boolean - ``` true ``` if the specified Object is equal to this instance; otherwise, ``` false ```.

hashCode()

public int hashCode()

Returns a hash code for this instance.

Returns: int - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.