MailAddress class
An email address can consist of separate fields
Constructors
- MailAddress(String? personalName, String email)
- MailAddress.empty()
- MailAddress.fromEnvelope(String? personalName, String? sourceRoute, String? mailboxName, String? hostName)
Properties
- email ↔ String
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasPersonalName → bool
-
Checks if this address has a personal name
no setter
- hostName ↔ String?
-
getter/setter pair
- mailboxName ↔ String?
-
getter/setter pair
- personalName ↔ String?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceRoute ↔ String?
-
getter/setter pair
Methods
-
encode(
) → String -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
Map< String, dynamic> attributes) → void -
Reads all field keys and values from the specified
attributesmap. This method is called after the de-serialization. -
toString(
) → String -
A string representation of this object.
override
-
write(
Map< String, dynamic> attributes) → void -
Sets all field keys and values in the specified
attributesmap. This method is called before the serialization. -
writeToStringBuffer(
StringBuffer buffer) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getMatch(
List< MailAddress> searchForList, List<MailAddress> ? searchInList, {bool handlePlusAliases = false, bool removeMatch = false, bool useMatchPersonalName = false}) → MailAddress? -
Searches the
searchForListaddresses in thesearchInListlist. SethandlePlusAliasestotruein case plus aliases should be checked, too. SetremoveMatchtotruein case the matching address should be removed from thesearchInListlist. SetuseMatchPersonalNametotrueto return the personal name from thesearchInListin the returned match. By default the personal name is retrieved from the matching entry insearchForList. -
getMatchingEmail(
String original, String check, {bool allowPlusAlias = false}) → String? -
Checks if both email addresses
originalandcheckmatch and returns the match. SetallowPlusAliasif plus aliases should be checked, so thatname+alias@domainmatches the originalname@domain.