OpenXE/classes/Components/Mailer/Mailer.php

30 lines
622 B
PHP
Raw Normal View History

2021-05-21 08:49:41 +02:00
<?php
declare(strict_types=1);
namespace Xentral\Components\Mailer;
use Xentral\Components\Mailer\Data\EmailMessage;
use Xentral\Components\Mailer\Transport\MailerTransportInterface;
class Mailer implements MailerInterface
{
/** @var MailerTransportInterface $transport */
private $transport;
public function __construct(MailerTransportInterface $transport)
{
$this->transport = $transport;
}
/**
* @param EmailMessage $email
*
* @return bool
*/
public function send(EmailMessage $email): bool
{
return $this->transport->sendEmail($email);
}
}