MailAddress class
An email address can consist of separate fields
Constructors
- MailAddress.new(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
attributes
map. 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
attributes
map. 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
searchForList
addresses in thesearchInList
list. SethandlePlusAliases
totrue
in case plus aliases should be checked, too. SetremoveMatch
totrue
in case the matching address should be removed from thesearchInList
list. SetuseMatchPersonalName
totrue
to return the personal name from thesearchInList
in 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
original
andcheck
match and returns the match. SetallowPlusAlias
if plus aliases should be checked, so thatname+alias@domain
matches the originalname@domain
.