Email class

Constructors

Email({required EmailAddress to, required String subject, required String template, Map<String, dynamic> variables = const {}, EmailAddress? from, String? thread, String? preheader, EmailAddress? replyTo, String? messageId, String? inReplyTo, List<String> references = const [], String? text})
const
Email.fromJson(Map<String, dynamic> json)
factory

Properties

from → EmailAddress?
final
hashCode → int
The hash code for this object.
no setterinherited
inReplyTo → String?
The Message-ID of the message this one answers -- any message, such as one a client sent the app.
final
messageId → String?
This message's own Message-ID, so the app can store it and recognise a later reply by its In-Reply-To.
final
preheader → String?
The inbox preview line, shown by mail clients next to the subject.
final
references → List<String>
The Message-IDs of the conversation so far, oldest first.
final
replyTo → EmailAddress?
Where replies go, when that is not from.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subject → String
final
template → String
The name of the template file (without the .html extension)
final
text → String?
A plain-text alternative to the HTML template, sent as-is.
final
thread → String?
Groups this message with earlier mail that used the same thread id.
final
to → EmailAddress
final
variables → Map<String, dynamic>
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

createMessageId(String from) → String
Builds a fresh Email.messageId on from's domain.
createThread(String id, {bool continueThread = false}) → String
Builds a Email.thread id. Pass continueThread when sending another message in the same conversation.
messageIdHeader(String id) → String
id as it goes in a Message-ID, In-Reply-To or References header: wrapped in angle brackets, which a caller may leave off.

Constants

continueThreadSuffix → const String