25 lines
536 B
PHP
25 lines
536 B
PHP
<?php
|
|
|
|
namespace App\Email;
|
|
|
|
use Illuminate\Contracts\Mail\Mailer;
|
|
use Illuminate\Mail\Message;
|
|
|
|
class LaravelMailer implements Emailer
|
|
{
|
|
public function __construct(
|
|
private Mailer $mailer,
|
|
) {}
|
|
|
|
public function send(string $from, string $to, string $body): void
|
|
{
|
|
$this->mailer->raw(
|
|
$body,
|
|
function (Message $message) use ($from, $to) {
|
|
$message->from($from)
|
|
->to($to)
|
|
->subject('TIDE');
|
|
}
|
|
);
|
|
}
|
|
}
|