Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 55217dc

Browse filesBrowse files
ssddanbrownjaviereguiluz
authored andcommitted
[Mailer] Document require_tls option
1 parent 8404c9b commit 55217dc
Copy full SHA for 55217dc

File tree

Expand file treeCollapse file tree

1 file changed

+23
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+23
-0
lines changed

‎mailer.rst

Copy file name to clipboardExpand all lines: mailer.rst
+23Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,29 @@ setting the ``auto_tls`` option to ``false`` in the DSN::
420420

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

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+
423446
Binding to IPv4 or IPv6
424447
~~~~~~~~~~~~~~~~~~~~~~~
425448

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.