OpenXE/classes/Components/Mailer/Mailer.php
2021-05-21 08:49:41 +02:00

30 lines
622 B
PHP

<?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);
}
}