MailMessage class
Implementation of MailMessageInterface.
Represents a complete email message with all its parts.
- Implemented types
Constructors
Properties
-
attachments
→ List<
MailAttachment> -
List of file attachments.
no setteroverride
-
bcc
→ List<
MailAddress> -
List of BCC addresses.
no setteroverride
-
cc
→ List<
MailAddress> -
List of CC addresses.
no setteroverride
-
embedded
→ List<
MailEmbedded> -
List of embedded images/files.
no setteroverride
- from → MailAddress?
-
The sender address.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
Custom headers.
no setteroverride
- htmlBody → String?
-
The HTML body.
no setteroverride
- priority → int
-
Email priority (1-5, where 1 is highest).
no setteroverride
- replyTo → MailAddress?
-
The reply-to address.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subject → String?
-
The email subject.
no setteroverride
- textBody → String?
-
The plain text body.
no setteroverride
-
to
→ List<
MailAddress> -
List of recipient addresses.
no setteroverride
Methods
-
addAttachment(
MailAttachment attachment) → void -
Adds an attachment.
override
-
addBcc(
String email, [String? name]) → void -
Adds a BCC recipient.
override
-
addCc(
String email, [String? name]) → void -
Adds a CC recipient.
override
-
addEmbedded(
MailEmbedded embedded) → void -
Adds an embedded file.
override
-
addTo(
String email, [String? name]) → void -
Adds a recipient.
override
-
copy(
) → MailMessage - Creates a copy of this message.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Resets the message to its initial state.
-
setFrom(
String email, [String? name]) → void -
Sets the sender.
override
-
setHeader(
String name, String value) → void -
Sets a custom header.
override
-
setHtmlBody(
String content) → void -
Sets the HTML body.
override
-
setPriority(
int priority) → void -
Sets the priority.
override
-
setReplyTo(
String email, [String? name]) → void -
Sets the reply-to address.
override
-
setSubject(
String subject) → void -
Sets the subject.
override
-
setTextBody(
String content) → void -
Sets the text body.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
) → void -
Validates the message before sending.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited