This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Mailer/Messenger/MessageHandler.php
2019-03-30 09:09:06 +01:00

35 lines
743 B
PHP

<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Messenger;
use Symfony\Component\Mailer\Transport\TransportInterface;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @experimental in 4.3
*/
class MessageHandler
{
private $transport;
public function __construct(TransportInterface $transport)
{
$this->transport = $transport;
}
public function __invoke(SendEmailMessage $message)
{
$this->transport->send($message->getMessage(), $message->getEnvelope());
}
}