for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace App\Mailer;
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Mime\Email;
final class Mailer
{
private MailerInterface $mailer;
public function __construct(MailerInterface $mailer)
$this->mailer = $mailer;
}
/**
* @throws TransportExceptionInterface
*/
public function send(Email $email): void
try {
$this->mailer->send($email);
} catch (TransportExceptionInterface $e) {
throw $e;