Skip to content

[Mailer] Document the stop() method of SmtpTransport #17100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions mailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,19 @@ disable asynchronous delivery.
->messageBus('app.another_bus');
};

.. note::

In cases of long-running scripts, and when Mailer uses the
:class:`Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport`
you may manually disconnect from the SMTP server to avoid keeping
an open connection to the SMTP server in between sending emails.
You can do so by using the ``stop()`` method.

.. versionadded:: 6.1

The :method:`Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport::stop()`
method was made public in Symfony 6.1.

Adding Tags and Metadata to Emails
----------------------------------

Expand Down