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.
user@example.com
user@example.com (This User)
Another User <other@example.net>
"display(name)" <sample@email.com>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 StringPOSTMASTER
-
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 StringgetEmail()get the email part of the addressStringgetName()get the name part of the addressStringtoString()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
-
-