public class EmailAddress extends Object
[email protected]
[email protected] (This User)
Another User <[email protected]>
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 © 2024 Eclipse. All rights reserved.