Message
class in package klyn.mails

    public abstract class Message extends Object:

Object
└ Message

Base mail message.

`MimeMessage` is the concrete implementation provided by this package.

    import klyn.mails

    message = MimeMessage()
    message.subject = "Hello"

Fields

Modifier and Type | Member | Description
--- | --- | ---
public readonly | bccRecipients `bccRecipients as ArrayList<String>` | Blind-carbon-copy recipients.
public readonly | ccRecipients `ccRecipients as ArrayList<String>` | Carbon-copy recipients.
public readonly | headers `headers as Map<String, String>` | Additional message headers.
public readonly | toRecipients `toRecipients as ArrayList<String>` | Primary recipients.

Properties

Modifier and Type | Member | Description
--- | --- | ---
public property | from `from as InternetAddress` | Author address.
public property | replyTo `replyTo as InternetAddress` | Optional reply-to address.
public property | sentDate `sentDate as DateTime` | Optional explicit sent date.
public property | session `session as Session` | Associated mail session.
public property | subject `subject as String` | Message subject.

Properties inherited from Object: type
Methods

Modifier and Type | Member | Description
--- | --- | ---
public | addBcc `addBcc(address as InternetAddress) as Message:` | Adds a `Bcc` recipient.
public | addBcc `addBcc(address as String) as Message throws AddressException:` | Adds a `Bcc` recipient from a mailbox string.
public | addCc `addCc(address as InternetAddress) as Message:` | Adds a `Cc` recipient.
public | addCc `addCc(address as String) as Message throws AddressException:` | Adds a `Cc` recipient from a mailbox string.
public | addRecipient `addRecipient(type as RecipientType, address as InternetAddress) as Message:` | Adds a recipient.
public | addTo `addTo(address as InternetAddress) as Message:` | Adds a `To` recipient.
public | addTo `addTo(address as String) as Message throws AddressException:` | Adds a `To` recipient from a mailbox string.
public | allRecipients `allRecipients() as ArrayList<String>:` | Returns all recipients, including `Bcc`.
public | header `header(name as String, value as String) as Message:` | Adds or replaces a custom header.
public | render `render() as String throws MessagingException:` | Renders the message as RFC 5322 text.

Methods inherited from Object: fromJson, toDict, toJson, toString, toXml