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 @@ -420,6 +420,29 @@ setting the ``auto_tls`` option to ``false`` in the DSN::
420
420
421
421
This setting only works when the ``smtp:// `` protocol is used.
422
422
423
+ Ensure TLS
424
+ ~~~~~~~~~~
425
+
426
+ You may want to ensure TLS is used, either directly or via ``STARTTLS ``,
427
+ for sending mail over SMTP regardless of other options set or SMTP server
428
+ support. You can set TLS as required by calling ``setRequireTls(true) ``
429
+ on the ``EsmtpTransport `` instance, or by setting the ``require_tls `` option
430
+ to ``true `` in the DSN::
431
+
432
+ $dsn = 'smtp://user:pass@10.0.0.25?require_tls=true';
433
+
434
+ When TLS is set as required, a :class: `Symfony\\ Component\\ Mailer\\ Exception\\ TransportException `
435
+ will be thrown if a TLS connection cannot be achieved during initial communications
436
+ with the SMTP server.
437
+
438
+ .. note ::
439
+
440
+ This setting only works when the ``smtp:// `` protocol is used.
441
+
442
+ .. versionadded :: 7.3
443
+
444
+ The ``require_tls `` option was introduced in Symfony 7.3.
445
+
423
446
Binding to IPv4 or IPv6
424
447
~~~~~~~~~~~~~~~~~~~~~~~
425
448
You can’t perform that action at this time.
0 commit comments