Skip to content

Commit 18006fb

Browse files
committed
[Mailer] Document the stop() method of SmtpTransport
1 parent 4975898 commit 18006fb

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)