SendMail - viames/pair GitHub Wiki

Pair framework: SendMail

Pair\Services\SendMail is a concrete mail sender service implementing the Mailer contract.

Main method

send(array $recipients, string $subject, string $title, string $text, array $attachments = [], array $ccs = []): void

Sends an email using configured provider logic inherited from base mail helper stack.

Implementation example

use Pair\Services\SendMail;

$mailer = new SendMail($config);
$mailer->send(
    ['name' => 'John', 'email' => '[email protected]'](/viames/pair/wiki/'name'-=>-'John',-'email'-=>-'[email protected]'),
    'Welcome',
    'Welcome to Pair',
    'Your account is ready.'
);

See also: Mailer, AmazonSes, SmtpMailer.