@@ -50,55 +50,57 @@ In the development configuration file, change the ``transport`` setting to
50
50
'password' => 'your_gmail_password',
51
51
));
52
52
53
- If you are using the Symfony Standard Edition, it's more convenient to configure
54
- these options in the ``parameters.yml.dist `` file:
53
+ .. tip ::
55
54
56
- .. code-block :: yaml
57
-
58
- # app/config/parameters.yml.dist
59
- parameters :
60
- # ...
61
- mailer_user : your_gmail_username
62
- mailer_password : your_gmail_password
63
-
64
- .. configuration-block ::
55
+ It's more convenient to configure these options in the ``parameters.yml ``
56
+ file:
65
57
66
58
.. code-block :: yaml
67
59
68
- # app/config/config_dev.yml
69
- swiftmailer :
70
- transport : gmail
71
- username : ' %mailer_user%'
72
- password : ' %mailer_password%'
73
-
74
- .. code-block :: xml
75
-
76
- <!-- app/config/config_dev.xml -->
77
- <?xml version =" 1.0" encoding =" UTF-8" ?>
78
- <container xmlns =" http://symfony.com/schema/dic/services"
79
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
80
- xmlns : swiftmailer =" http://symfony.com/schema/dic/swiftmailer"
81
- xsi : schemaLocation =" http://symfony.com/schema/dic/services
82
- http://symfony.com/schema/dic/services/services-1.0.xsd
83
- http://symfony.com/schema/dic/swiftmailer
84
- http://symfony.com/schema/dic/swiftmailer/swiftmailer-1.0.xsd" >
85
-
86
- <!-- ... -->
87
- <swiftmailer : config
88
- transport =" gmail"
89
- username =" %mailer_user%"
90
- password =" %mailer_password%"
91
- />
92
- </container >
93
-
94
- .. code-block :: php
95
-
96
- // app/config/config_dev.php
97
- $container->loadFromExtension('swiftmailer', array(
98
- 'transport' => 'gmail',
99
- 'username' => '%mailer_user%',
100
- 'password' => '%mailer_password%',
101
- ));
60
+ # app/config/parameters.yml
61
+ parameters :
62
+ # ...
63
+ mailer_user : your_gmail_username
64
+ mailer_password : your_gmail_password
65
+
66
+ .. configuration-block ::
67
+
68
+ .. code-block :: yaml
69
+
70
+ # app/config/config_dev.yml
71
+ swiftmailer :
72
+ transport : gmail
73
+ username : ' %mailer_user%'
74
+ password : ' %mailer_password%'
75
+
76
+ .. code-block :: xml
77
+
78
+ <!-- app/config/config_dev.xml -->
79
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
80
+ <container xmlns =" http://symfony.com/schema/dic/services"
81
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
82
+ xmlns : swiftmailer =" http://symfony.com/schema/dic/swiftmailer"
83
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
84
+ http://symfony.com/schema/dic/services/services-1.0.xsd
85
+ http://symfony.com/schema/dic/swiftmailer
86
+ http://symfony.com/schema/dic/swiftmailer/swiftmailer-1.0.xsd" >
87
+
88
+ <!-- ... -->
89
+ <swiftmailer : config
90
+ transport =" gmail"
91
+ username =" %mailer_user%"
92
+ password =" %mailer_password%"
93
+ />
94
+ </container >
95
+
96
+ .. code-block :: php
97
+
98
+ // app/config/config_dev.php
99
+ $container->loadFromExtension('swiftmailer', array(
100
+ 'transport' => 'gmail',
101
+ 'username' => '%mailer_user%',
102
+ 'password' => '%mailer_password%',
103
+ ));
102
104
103
105
Redefining the Default Configuration Parameters
104
106
-----------------------------------------------
@@ -127,7 +129,8 @@ that you `allow less secure apps to access your Gmail account`_.
127
129
128
130
.. seealso ::
129
131
130
- :doc: `Swiftmailer configuration reference </reference/configuration/swiftmailer >`
132
+ see the :doc: `Swiftmailer configuration reference </reference/configuration/swiftmailer >`
133
+ for more details.
131
134
132
135
.. _`generate an App password` : https://support.google.com/accounts/answer/185833
133
136
.. _`allow less secure apps to access your Gmail account` : https://support.google.com/accounts/answer/6010255
0 commit comments