Package io.vertx.ext.mail.mailencoder
Class EmailAddress
- java.lang.Object
-
- io.vertx.ext.mail.mailencoder.EmailAddress
-
public class EmailAddress extends Object
represent a mail address with an email address part and an optional full name e.g.
[email protected]
[email protected] (This User)
Another User <[email protected]>
"display(name)" <[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
- Author:
- Alexander Lehmann
-
-
Field Summary
Fields Modifier and Type Field Description static String
POSTMASTER
-
Constructor Summary
Constructors Constructor Description EmailAddress(String fullAddress)
parse and create an email address
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getEmail()
get the email part of the addressString
getName()
get the name part of the addressString
toString()
get a representation of the address (this is mostly for testing)
-
-
-
Field Detail
-
POSTMASTER
public static final String POSTMASTER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EmailAddress
public EmailAddress(String fullAddress)
parse and create an email address- Parameters:
fullAddress
- full address string- Throws:
IllegalArgumentException
- if an address is not valid
-
-