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 6c07b60

Browse filesBrowse files
committed
[#5856] Applied final comments
1 parent 7f08196 commit 6c07b60
Copy full SHA for 6c07b60

File tree

Expand file treeCollapse file tree

1 file changed

+49
-46
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+49
-46
lines changed

‎cookbook/email/gmail.rst

Copy file name to clipboardExpand all lines: cookbook/email/gmail.rst
+49-46Lines changed: 49 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -50,55 +50,57 @@ In the development configuration file, change the ``transport`` setting to
5050
'password' => 'your_gmail_password',
5151
));
5252
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::
5554

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:
6557

6658
.. code-block:: yaml
6759
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+
));
102104
103105
Redefining the Default Configuration Parameters
104106
-----------------------------------------------
@@ -127,7 +129,8 @@ that you `allow less secure apps to access your Gmail account`_.
127129

128130
.. seealso::
129131

130-
:doc:`Swiftmailer configuration reference </reference/configuration/swiftmailer>`
132+
see the :doc:`Swiftmailer configuration reference </reference/configuration/swiftmailer>`
133+
for more details.
131134

132135
.. _`generate an App password`: https://support.google.com/accounts/answer/185833
133136
.. _`allow less secure apps to access your Gmail account`: https://support.google.com/accounts/answer/6010255

0 commit comments

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