Represents an email message that can be sent.
This interface defines the structure of an email message including recipients, content, attachments, and metadata.
- Implementers
Properties
-
attachments
→ List<
MailAttachment> -
List of file attachments.
no setter
-
bcc
→ List<
MailAddress> -
List of BCC addresses.
no setter
-
cc
→ List<
MailAddress> -
List of CC addresses.
no setter
-
embedded
→ List<
MailEmbedded> -
List of embedded images/files.
no setter
- from → MailAddress?
-
The sender address.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
Custom headers.
no setter
- htmlBody → String?
-
The HTML body.
no setter
- priority → int
-
Email priority (1-5, where 1 is highest).
no setter
- replyTo → MailAddress?
-
The reply-to address.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subject → String?
-
The email subject.
no setter
- textBody → String?
-
The plain text body.
no setter
-
to
→ List<
MailAddress> -
List of recipient addresses.
no setter
Methods
-
addAttachment(
MailAttachment attachment) → void - Adds an attachment.
-
addBcc(
String email, [String? name]) → void - Adds a BCC recipient.
-
addCc(
String email, [String? name]) → void - Adds a CC recipient.
-
addEmbedded(
MailEmbedded embedded) → void - Adds an embedded file.
-
addTo(
String email, [String? name]) → void - Adds a recipient.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setFrom(
String email, [String? name]) → void - Sets the sender.
-
setHeader(
String name, String value) → void - Sets a custom header.
-
setHtmlBody(
String content) → void - Sets the HTML body.
-
setPriority(
int priority) → void - Sets the priority.
-
setReplyTo(
String email, [String? name]) → void - Sets the reply-to address.
-
setSubject(
String subject) → void - Sets the subject.
-
setTextBody(
String content) → void - Sets the text body.
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
) → void - Validates the message before sending.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited