Skip to content

Complete documentation about mailer integration #14083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions mailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,20 @@ over SMTP by configuring the DSN in your ``.env`` file (the ``user``,
Using Built-in Transports
~~~~~~~~~~~~~~~~~~~~~~~~~

============ ======================================== ==============================
.. versionadded:: 5.2

The native protocol was introduced in Symfony 5.2.

============ ======================================== ==============================================================
DSN protocol Example Description
============ ======================================== ==============================
smtp ``smtp://user:pass@smtp.example.com:25`` Mailer uses an SMTP server to
send emails
sendmail ``sendmail://default`` Mailer uses the local sendmail
binary to send emails
============ ======================================== ==============================
============ ======================================== ==============================================================
smtp ``smtp://user:pass@smtp.example.com:25`` Mailer uses an SMTP server to send emails
sendmail ``sendmail://default`` Mailer uses the local sendmail binary to send emails
native ``native://default`` Mailer uses the sendmail binary and options configured
in the ``sendmail_path`` setting of ``php.ini``. On Windows
hosts, Mailer fallbacks to ``smtp`` and ``smtp_port``
``php.ini`` settings when ``sendmail_path`` is not configured.
============ ======================================== ==============================================================

Using a 3rd Party Transport
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
18 changes: 16 additions & 2 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ Configuration
* `sender`_
* `recipients`_

* :ref:`headers <mailer-headers>`

* `php_errors`_

* `log`_
Expand Down Expand Up @@ -927,8 +929,6 @@ This setting is automatically set to true when one of the child settings is conf

.. _http-headers:

.. _http-headers:

headers
.......

Expand Down Expand Up @@ -3091,6 +3091,20 @@ recipients set in the code.
]);
};

.. _mailer-headers:

headers
.......

.. versionadded:: 5.2

The ``headers`` mailer option was introduced in Symfony 5.2.

**type**: ``array``

Headers to add to emails. The key (``name`` attribute in xml format) is the
header name and value the header value.

workflows
~~~~~~~~~

Expand Down