fromEmail property
String?
get
fromEmail
The email of the first from address of this message
Implementation
String? get fromEmail {
final from = this.from;
if (from != null && from.isNotEmpty) {
return from.first.email;
} else if (headers != null) {
final fromHeaderValue =
headers?.firstWhereOrNull((h) => h.lowerCaseName == 'from')?.value;
if (fromHeaderValue != null) {
return ParserHelper.parseEmail(fromHeaderValue);
}
}
return null;
}