Skip to content

Commit 23bdb62

Browse files
committed
minor #7862 Backport #7510 for the Symfony 2.7 docs (mykiwi, javiereguiluz, xabbuh)
This PR was merged into the 2.7 branch. Discussion ---------- Backport #7510 for the Symfony 2.7 docs All the documented options are part of SwiftmailerBundle releases that are compatible with Symfony 2.7. Commits ------- 1c39991 fix versionadded directives 8eaccef Removed "encryption" and "auth_mode" from the list of %env()% compatible options 3395258 Fixed ... again ... the versionadded directives 3333723 Added the missing "versionadded" directives 0e2853a add mail transport as deprecated 2bd1a22 Minor tweaks b161bd8 update swiftmailer reference
2 parents 2b187c8 + 1c39991 commit 23bdb62

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

reference/configuration/swiftmailer.rst

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@ a mailer. It is also possible to configure several mailers (see
1818
Configuration
1919
-------------
2020

21+
* `url`_
2122
* `transport`_
2223
* `username`_
2324
* `password`_
2425
* `host`_
2526
* `port`_
27+
* `timeout`_
28+
* `source_ip`_
29+
* `local_domain`_
2630
* `encryption`_
2731
* `auth_mode`_
2832
* `spool`_
@@ -37,6 +41,15 @@ Configuration
3741
* `disable_delivery`_
3842
* `logging`_
3943

44+
url
45+
~~~
46+
47+
**type**: ``string``
48+
49+
The entire SwiftMailer configuration using a DSN-like URL format.
50+
51+
Example: ``smtp://user:pass@host:port/?timeout=60&encryption=ssl&auth_mode=login&...``
52+
4053
transport
4154
~~~~~~~~~
4255

@@ -46,7 +59,7 @@ The exact transport method to use to deliver emails. Valid values are:
4659

4760
* smtp
4861
* gmail (see :doc:`/email/gmail`)
49-
* mail
62+
* mail (deprecated in SwiftMailer since version 5.4.5)
5063
* sendmail
5164
* null (same as setting `disable_delivery`_ to ``true``)
5265

@@ -79,6 +92,30 @@ port
7992
The port when using ``smtp`` as the transport. This defaults to 465 if encryption
8093
is ``ssl`` and 25 otherwise.
8194

95+
timeout
96+
~~~~~~~
97+
98+
**type**: ``integer``
99+
100+
The timeout in seconds when using ``smtp`` as the transport.
101+
102+
source_ip
103+
~~~~~~~~~
104+
105+
**type**: ``string``
106+
107+
The source IP address when using ``smtp`` as the transport.
108+
109+
local_domain
110+
~~~~~~~~~~~~
111+
112+
**type**: ``string``
113+
114+
.. versionadded:: 2.4.0
115+
The ``local_domain`` option was introduced in SwiftMailerBundle 2.4.0.
116+
117+
The domain name to use in ``HELO`` command.
118+
82119
encryption
83120
~~~~~~~~~~
84121

@@ -191,6 +228,13 @@ logging
191228
If true, Symfony's data collector will be activated for Swift Mailer and
192229
the information will be available in the profiler.
193230

231+
.. tip::
232+
233+
The following options can be set via environment variables using the
234+
``%env()%`` syntax: ``url``, ``transport``, ``username``, ``password``,
235+
``host``, ``port``, ``timeout``, ``source_ip``, ``local_domain``.
236+
For details, see the :doc:`/configuration/external_parameters` article.
237+
194238
Full Default Configuration
195239
--------------------------
196240

0 commit comments

Comments
 (0)