Skip to content

Commit 6c53b67

Browse files
committed
minor #17100 [Mailer] Document the stop() method of SmtpTransport (94noni)
This PR was merged into the 6.1 branch. Discussion ---------- [Mailer] Document the stop() method of SmtpTransport Ref #16473 Also see the comment symfony/symfony#45307 (comment) The text is heavily inspired by the code comment Commits ------- 18006fb [Mailer] Document the stop() method of SmtpTransport
2 parents eae7780 + 18006fb commit 6c53b67

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

mailer.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,6 +1240,19 @@ disable asynchronous delivery.
12401240
->messageBus('app.another_bus');
12411241
};
12421242
1243+
.. note::
1244+
1245+
In cases of long-running scripts, and when Mailer uses the
1246+
:class:`Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport`
1247+
you may manually disconnect from the SMTP server to avoid keeping
1248+
an open connection to the SMTP server in between sending emails.
1249+
You can do so by using the ``stop()`` method.
1250+
1251+
.. versionadded:: 6.1
1252+
1253+
The :method:`Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport::stop()`
1254+
method was made public in Symfony 6.1.
1255+
12431256
Adding Tags and Metadata to Emails
12441257
----------------------------------
12451258

0 commit comments

Comments
 (0)