Message class

This class represents an e-mail that can be sent to someone/some people.

Use text to specify plaintext body or html to specify HTML body. Use both to provide a fallback for text-only email clients.

The envelope 'MAIL FROM:' and 'RCPT TO:' are extracted from from and recipients, ccRecipients and bccRecipients.

If envelopeFrom is not null it is used instead for the 'MAIL FROM:' envelope SMTP command.

If envelopeTos is not null it is used instead for the 'RCPT TO:' commands. Note that in this case the bccRecipients list is completely ignored.

Setting the from address is required! You may use a group address (Group:;) if you don't want to provide an address. However some (/most?) smtp servers will use your login address in that case.

The From:, To:, Cc: and Subject: headers are build from the corresponding fields, unless a headers entry exists.

See Attachment for how to reference inline-attachments.

Constructors

Message()

Properties

attachments List<Attachment>
getter/setter pair
bccRecipients List
See from for allowed types.
getter/setter pair
bccsAsAddresses Iterable<Address>
no setter
ccRecipients List
See from for allowed types.
getter/setter pair
ccsAsAddresses Iterable<Address>
no setter
envelopeFrom String?
getter/setter pair
envelopeTos List<String>?
getter/setter pair
from ↔ dynamic
Allowed types are String and Address String must be a simple email-address.
getter/setter pair
fromAsAddress Address
no setter
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, dynamic>
Allowed values are String, Address, Iterable
getter/setter pair
html String?
getter/setter pair
recipients List
See from for allowed types.
getter/setter pair
recipientsAsAddresses Iterable<Address>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subject String?
getter/setter pair
text String?
getter/setter pair

Methods

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

Operators

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