Skip to content

Commit de129ea

Browse files
committed
minor #19469 [Mailer][Smtp] Document auto_tls param (srsbiz)
This PR was merged into the 7.1 branch. Discussion ---------- [Mailer][Smtp] Document `auto_tls` param Fixes #19465 Commits ------- ead19d0 [Mailer][Smtp] Document 'auto_tls' param
2 parents d2608de + ead19d0 commit de129ea

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

mailer.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,30 @@ may be specified as SHA1 or MD5 hash::
347347

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

350+
Disabling automatic TLS
351+
~~~~~~~~~~~~~~~~~~~~~~~
352+
353+
.. versionadded:: 7.1
354+
355+
Disabling automatic TLS was introduced in Symfony 7.1.
356+
357+
By default, mailer will check if OpenSSL extension is enabled and if SMTP server
358+
is capable of STARTTLS, it will issue this command to enable encryption on stream.
359+
This behavior can be turned off by calling ``setAutoTls(false)`` on ``EsmtpTransport``
360+
instance, or by setting ``auto_tls`` option in DSN::
361+
362+
$dsn = 'smtp://user:pass@10.0.0.25?auto_tls=false';
363+
364+
.. caution::
365+
366+
It's not recommended to disable TLS while connecting to SMTP server over
367+
internet, but it can be useful when both application and SMTP server are in
368+
secured network, where there is no need for additional encryption.
369+
370+
.. note::
371+
372+
This setting works only when ``smtp://`` protocol is used.
373+
350374
Overriding default SMTP authenticators
351375
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
352376

0 commit comments

Comments
 (0)