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 the searchInList list. Set handlePlusAliases to true in case plus aliases should be checked, too. Set removeMatch to true in case the matching address should be removed from the searchInList list. Set useMatchPersonalName to true to return the personal name from the searchInList in the returned match. By default the personal name is retrieved from the matching entry in searchForList.
getMatchingEmail(String original, String check, {bool allowPlusAlias = false}) String?
Checks if both email addresses original and check match and returns the match. Set allowPlusAlias if plus aliases should be checked, so that name+alias@domain matches the original name@domain.