API / Minn\Mail / MailSettings

MailSettings final readonly class

Minn\Mail\MailSettings · public/minn/src/Minn/Mail/MailSettings.php · 71 lines

How mail leaves the site, from the minn_mail option (JSON or a serialized array): the PHP mail function by default, SMTP when configured, or a log file for development. The sender defaults to the site name at a no-reply address on the home host.

Constants and properties

constOPTION = 'minn_mail'
propreadonly string $transport

Promoted from the constructor.

propreadonly string $host

Promoted from the constructor.

propreadonly int $port

Promoted from the constructor.

propreadonly string $encryption

Promoted from the constructor.

propreadonly string $username

Promoted from the constructor.

propreadonly string $password

Promoted from the constructor.

propreadonly string $fromEmail

Promoted from the constructor.

propreadonly string $fromName

Promoted from the constructor.

Public

new__construct(string $transport = 'mail', string $host = '', int $port = 587, string $encryption = 'tls', string $username = '', string $password = '', string $fromEmail = '', string $fromName = '')#
$transport'mail'|'smtp'|'log'
$encryption'none'|'ssl'|'tls'
staticstored(Minn\Content\Site $site): array#

What the minn_mail option holds, without defaults: empty when the site has not configured mail.

@return array<string, mixed>
staticfromSite(Minn\Content\Site $site): self#

The site's mail settings from its minn_mail option, or the defaults.

methodtoArray(): array#

The option's JSON, secrets included, for the settings surface.