mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-16 04:57:15 +01:00
30 lines
622 B
PHP
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);
|
||
|
}
|
||
|
}
|