public class EmailAddress extends Object
user@example.com
user@example.com (This User)
Another User <other@example.net>
the constructor will validate the address catching format errors like excess spaces, newlines the test is not very strict, for example an IDN address will be considered valid, even though SMTP doesn't work with that yet
Modifier and Type | Field and Description |
---|---|
static String |
POSTMASTER |
Constructor and Description |
---|
EmailAddress(String fullAddress)
parse and create an email address
|
Modifier and Type | Method and Description |
---|---|
String |
getEmail()
get the email part of the address
|
String |
getName()
get the name part of the address
|
String |
toString()
get a representation of the address (this is mostly for testing)
|
public static final String POSTMASTER
public EmailAddress(String fullAddress)
fullAddress
- full address stringIllegalArgumentException
- if an address is not validCopyright © 2021 Eclipse. All rights reserved.