EmailMessage
Corex\Email\Message\EmailMessage · class · Add-ons layer
The immutable, validated message a driver delivers.
Public API
Section titled “Public API”__construct(array $to, array $cc, array $bcc, ?string $replyTo, string $subject, string $body, array $headers, ?string $from, array $attachments, ?string $plainText, ?string $fromName)
Section titled “__construct(array $to, array $cc, array $bcc, ?string $replyTo, string $subject, string $body, array $headers, ?string $from, array $attachments, ?string $plainText, ?string $fromName)”withHeaders(array $headers): self
Section titled “withHeaders(array $headers): self”This message with headers added to its own, the added ones winning. Headers are not written as they are given. A driver writes the ones it knows by name, each checked for what it has to be: see {@see \Corex\Email\Driver\WpMailDriver}.