type

Email

src @Serializable
class Email : Obj

Email models a top level MIME message.

See pod doc and examples.

fields

bcc

List of "bcc" email addresses.

body

Body of the email - typically an instance of TextPart or MultiPart.

cc

List of "cc" email addresses.

from

From email address.

msgId

Unique identifier for message (auto-generated).

subject

Subject of the email.

to

List of "to" email addresses.

methods

encode

Encode as a MIME message according to RFC 822.

recipients

Return the aggregation of to, cc, and bcc.

validate

Validate this email message - throw Err if not configured correctly.

Slot Details

bcc

src Str[]? bcc

List of "bcc" email addresses. See MimeUtil.toAddrSpec for address formatting.

body

src EmailPart? body

Body of the email - typically an instance of TextPart or MultiPart.

cc

src Str[]? cc

List of "cc" email addresses. See MimeUtil.toAddrSpec for address formatting.

encode

src virtual Void encode(OutStream out)

Encode as a MIME message according to RFC 822.

from

src Str? from

From email address. See MimeUtil.toAddrSpec for address formatting.

msgId

src Str msgId := ...

Unique identifier for message (auto-generated).

recipients

src Str[] recipients()

Return the aggregation of to, cc, and bcc.

subject

src Str subject := ""

Subject of the email. This string can be any Unicode and is automatically translated into an encoded word.

to

src Str[]? to

List of "to" email addresses. See MimeUtil.toAddrSpec for address formatting.

validate

src virtual Void validate()

Validate this email message - throw Err if not configured correctly.