Application Mailer

TODO…

Mailer Config

Mailer

Configuring custom mailer.

use WebinoConfigLib\Feature\Log;

Webino::config([
    // TODO...
    new DefaultMailer(FileMailer::class),
    new FileMailer(),
    new SmtpMailer(),
    new SendmailMailer(),
    new InMemoryMailer(),
]);

Mail

TODO…

use WebinoConfigLib\Feature\Log;

Webino::config([
    // TODO...
    new Mail(),
]);

Mailer Cookbook

Mailing Messages

TODO…

// simple message
$app->mail()->send('recipient@example.com', 'The subject', 'The body');

$app->mail()->send(['recipient-one@example.com', 'recipient-two@example.com'], 'The subject', 'The body');

// message template
$app->mail('my-mail')->send('recipient@example.com');

// overriding template subject & body
$app->mail('my-mail')->send('recipient@example.com', 'The subject', 'The body');

// attachments
$app->mail()
    ->setAttachments(['test.txt' => 'data/mail/test.txt', 'data/mail/other.txt'])
    ->send('recipient@example.com', 'The subject', 'The body');