API / Minn\Mail / Draft

Draft final readonly class

Minn\Mail\Draft · public/minn/src/Minn/Mail/Draft.php · 66 lines

Everything a message is composed from: the transport it goes out on (which decides the line ending, the header line length, and where To, Subject and Bcc are written), the envelope, the content, the headers, and the attachments as [path or data, file name, name, encoding, type, is data, disposition, content id]. $toHeader is "list" (To, or undisclosed-recipients when there is neither To nor Cc) or "omit" (one message per recipient, the address given to each send instead).

Constants and properties

constVERSION = '7.1.1'
propreadonly string $mailer

Promoted from the constructor.

propreadonly string $eol

Promoted from the constructor.

propreadonly string $charset

Promoted from the constructor.

propreadonly string $contentType

Promoted from the constructor.

propreadonly string $encoding

Promoted from the constructor.

propreadonly string $subject

Promoted from the constructor.

propreadonly string $body

Promoted from the constructor.

propreadonly string $altBody

Promoted from the constructor.

propreadonly string $ical

Promoted from the constructor.

propreadonly string $from

Promoted from the constructor.

propreadonly string $fromName

Promoted from the constructor.

propreadonly array $to

Promoted from the constructor.

propreadonly array $cc

Promoted from the constructor.

propreadonly array $bcc

Promoted from the constructor.

propreadonly array $replyTo

Promoted from the constructor.

propreadonly string $messageId

Promoted from the constructor.

propreadonly string $messageDate

Promoted from the constructor.

propreadonly ?int $priority

Promoted from the constructor.

propreadonly string $xMailer

Promoted from the constructor.

propreadonly string $confirmReadingTo

Promoted from the constructor.

propreadonly array $customHeaders

Promoted from the constructor.

propreadonly array $attachments

Promoted from the constructor.

propreadonly string $toHeader

Promoted from the constructor.

Public

new__construct(string $mailer, string $eol, string $charset, string $contentType, string $encoding, string $subject, string $body, string $altBody, string $ical, string $from, string $fromName, array $to, array $cc, array $bcc, array $replyTo, string $messageId, string $messageDate, ?int $priority, string $xMailer, string $confirmReadingTo, array $customHeaders, array $attachments, string $toHeader = 'list')#
$tolist<array{0: string, 1: string}>address and name pairs, as are $cc, $bcc and $replyTo
$customHeaderslist<array{0: string, 1: string}>name and value pairs
$attachmentslist<array<int, mixed>>
methodlineLength(): int#

The longest header line the transport takes before it must fold.

methodencodeHeader(string $text, string $position = 'text'): string#

Header text encoded for this message's charset and transport.

methodmessageType(): string#

Which parts the message has: plain, or "alt", "inline", "attach" joined by "_".