Skip to content

Commit 71ab78f

Browse files
committed
bug #12531 Fix construction of SmtpTransport in Mailer docs (pskt)
This PR was merged into the 4.3 branch. Discussion ---------- Fix construction of SmtpTransport in Mailer docs Changed `SmtpTransport` to `EsmtpTransport` in standalone component docs. `SmtpTransport::__construct()` requires instance of `AbstractStream` (see https://github.com/symfony/mailer/blob/master/Transport/Smtp/SmtpTransport.php#L41). Construction with host name is available in `EsmtpTransport` (https://github.com/symfony/mailer/blob/master/Transport/Smtp/EsmtpTransport.php#L33) Commits ------- c66c4af Fix construction of SmtpTransport in Mailer docs
2 parents 5a3a845 + c66c4af commit 71ab78f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/mailer.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ Usage
3030
The Mailer component has two main classes: a ``Transport`` and the ``Mailer`` itself::
3131

3232
use Symfony\Component\Mailer\Mailer;
33-
use Symfony\Component\Mailer\Transport\Smtp\SmtpTransport;
33+
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
3434

35-
$transport = new SmtpTransport('localhost');
35+
$transport = new EsmtpTransport('localhost');
3636
$mailer = new Mailer($transport);
3737
$mailer->send($email);
3838

0 commit comments

Comments
 (0)