use Symfony\Component\Mailer\Exception\TransportException;
use Symfony\Component\Mailer\Transport\Smtp\Auth\CramMd5Authenticator;
use Symfony\Component\Mailer\Transport\Smtp\Auth\LoginAuthenticator;
use Symfony\Component\Mailer\Transport\Smtp\Auth\XOAuth2Authenticator;
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
use Symfony\Component\Mime\Email;
class EsmtpTransportTest extends TestCase
{ public function testToString() { $t =
new EsmtpTransport();
$this->
assertEquals('smtp://localhost',
(string) $t);
$t =
new EsmtpTransport('example.com'
);
if (\
defined('OPENSSL_VERSION_NUMBER'
)) { $this->
assertEquals('smtps://example.com',
(string) $t);
} else { $this->
assertEquals('smtp://example.com',
(string) $t);
} $t =
new EsmtpTransport('example.com', 2525
);
$this->
assertEquals('smtp://example.com:2525',
(string) $t);