File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -416,6 +416,29 @@ setting the ``auto_tls`` option to ``false`` in the DSN::
416
416
the Internet, but it can be useful when both the application and the SMTP
417
417
server are in a secured network, where there is no need for additional encryption.
418
418
419
+ .. note ::
420
+
421
+ This setting only works when the ``smtp:// `` protocol is used.
422
+
423
+ Require use of TLS
424
+ ~~~~~~~~~~~~~~~~~~
425
+
426
+ .. versionadded :: 7.3
427
+
428
+ The option to require TLS was introduced in Symfony 7.3.
429
+
430
+ You may want to ensure TLS is used, either directly or via ``STARTTLS ``,
431
+ for sending mail over SMTP regardless of other options set or SMTP server
432
+ support. You can set TLS as required by calling ``setRequireTls(true) ``
433
+ on the ``EsmtpTransport `` instance, or by setting the ``require_tls `` option
434
+ to ``true `` in the DSN::
435
+
436
+ $dsn = 'smtp://user:[email protected] ?require_tls=true';
437
+
438
+ When TLS is set as required, a :class: `Symfony\\ Component\\ Mailer\\ Exception\\ TransportException `
439
+ will be thrown if a TLS connection cannot be achieved during initial communications
440
+ with the SMTP server.
441
+
419
442
.. note ::
420
443
421
444
This setting only works when the ``smtp:// `` protocol is used.
You can’t perform that action at this time.
0 commit comments