@@ -46,6 +46,7 @@ over SMTP by configuring the DSN in your ``.env`` file (the ``user``,
46
46
xsi : schemaLocation =" http://symfony.com/schema/dic/services
47
47
https://symfony.com/schema/dic/services/services-1.0.xsd
48
48
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
49
+
49
50
<framework : config >
50
51
<framework : mailer dsn =" %env(MAILER_DSN)%" />
51
52
</framework : config >
@@ -55,6 +56,7 @@ over SMTP by configuring the DSN in your ``.env`` file (the ``user``,
55
56
56
57
// config/packages/mailer.php
57
58
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
59
+
58
60
return static function (ContainerConfigurator $containerConfigurator): void {
59
61
$containerConfigurator->extension('framework', [
60
62
'mailer' => [
@@ -71,19 +73,25 @@ over SMTP by configuring the DSN in your ``.env`` file (the ``user``,
71
73
Using Built-in Transports
72
74
~~~~~~~~~~~~~~~~~~~~~~~~~
73
75
74
- ============ ======================================== ==============================
76
+ .. versionadded :: 5.2
77
+
78
+ The native protocol was introduced in Symfony 5.2.
79
+
80
+ ============ ======================================== ==============================================================
75
81
DSN protocol Example Description
76
- ============ ======================================== ==============================
77
- smtp ``
smtp://user:[email protected] :25 `` Mailer uses an SMTP server to
78
- send emails
79
- sendmail ``sendmail://default `` Mailer uses the local sendmail
80
- binary to send emails
81
- ============ ======================================== ==============================
82
+ ============ ======================================== ==============================================================
83
+ smtp ``
smtp://user:[email protected] :25 `` Mailer uses an SMTP server to send emails
84
+ sendmail ``sendmail://default `` Mailer uses the local sendmail binary to send emails
85
+ native ``native://default `` Mailer uses the sendmail binary and options configured
86
+ in the ``sendmail_path `` setting of ``php.ini ``. On Windows
87
+ hosts, Mailer fallbacks to ``smtp `` and ``smtp_port ``
88
+ ``php.ini `` settings when ``sendmail_path `` is not configured.
89
+ ============ ======================================== ==============================================================
82
90
83
91
Using a 3rd Party Transport
84
92
~~~~~~~~~~~~~~~~~~~~~~~~~~~
85
93
86
- Instead of using your own SMTP server, you can send emails via a 3rd party
94
+ Instead of using your own SMTP server or sendmail binary , you can send emails via a 3rd party
87
95
provider. Mailer supports several - install whichever you want:
88
96
89
97
================== ==============================================
0 commit comments