MailAddress class

An email address can consist of separate fields

Annotations
  • @JsonSerializable()

Constructors

MailAddress(String? personalName, String email)
Creates a new mail address
const
MailAddress.fromEnvelope({required String mailboxName, required String hostName, String? personalName})
Creates a new mail address
factory
MailAddress.fromJson(Map<String, dynamic> json)
Creates a new MailAddress form the given json
factory
MailAddress.parse(String input)
Creates a new mail address by parsing the input.
factory

Properties

email String
email address
final
hashCode int
The hash code for this object.
no setteroverride
hasNoPersonalName bool
Checks if this address has not a personal name
no setter
hasPersonalName bool
Checks if this address has a personal name
no setter
hostName String
host name
no setter
mailboxName String
mailbox name
no setter
personalName String?
personal name
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? personalName, String? email}) MailAddress
Copies this mail address with the given values
encode() String
Encodes this mail address
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this MailAddress to JSON
toString() String
A string representation of this object.
override
writeToStringBuffer(StringBuffer buffer) → void
Encodes this mail address into the given buffer

Operators

operator ==(Object other) bool
The equality operator.
override

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.
getMatchingEmail(String original, String check, {bool allowPlusAlias = false}) String?
Checks if both email addresses original and check match and returns the match.