Skip to content

[Mailer] [Smtp] Document auto_tls param #19469

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
Jan 31, 2024
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
24 changes: 24 additions & 0 deletions mailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,30 @@ may be specified as SHA1 or MD5 hash::

$dsn = 'smtp://user:pass@smtp.example.com?peer_fingerprint=6A1CF3B08D175A284C30BC10DE19162307C7286E';

Disabling automatic TLS
~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 7.1

Disabling automatic TLS was introduced in Symfony 7.1.

By default, mailer will check if OpenSSL extension is enabled and if SMTP server
is capable of STARTTLS, it will issue this command to enable encryption on stream.
This behavior can be turned off by calling ``setAutoTls(false)`` on ``EsmtpTransport``
instance, or by setting ``auto_tls`` option in DSN::

$dsn = 'smtp://user:pass@10.0.0.25?auto_tls=false';

.. caution::

It's not recommended to disable TLS while connecting to SMTP server over
internet, but it can be useful when both application and SMTP server are in
secured network, where there is no need for additional encryption.

.. note::

This setting works only when ``smtp://`` protocol is used.

Overriding default SMTP authenticators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down