Spaces:
No application file
No application file
File size: 856 Bytes
d2897cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
<?php
namespace Mautic\EmailBundle\Tests\Helper\Transport;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\TransportInterface;
use Symfony\Component\Mime\Email;
use Symfony\Component\Mime\RawMessage;
class SmtpTransport implements TransportInterface
{
/**
* @var array<string, mixed>
*/
private $transports = []; // @phpstan-ignore-line
public Email $sentMessage;
public function __construct()
{
$this->transports['main'] = $this;
}
public function send(RawMessage $message, Envelope $envelope = null): ?SentMessage
{
if ($message instanceof Email) {
$this->sentMessage = clone $message;
}
return null;
}
public function __toString(): string
{
return 'null://';
}
}
|