Skip to content

Commit 4f7c0f3

Browse files
committed
Fixes and improvements after review
1 parent 3490722 commit 4f7c0f3

File tree

3 files changed

+42
-35
lines changed

3 files changed

+42
-35
lines changed

cookbook/email/cloud.rst

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. index::
2-
single: Emails; Cloud
2+
single: Emails; Using the cloud
33

4-
How to use the Cloud to send Emails
4+
How to use the Cloud to Send Emails
55
===================================
66

77
Requirements for sending emails from a production system differ from your
@@ -38,30 +38,33 @@ and complete the configuration with the provided ``username`` and ``password``:
3838
.. code-block:: xml
3939
4040
<!-- app/config/config.xml -->
41-
42-
<!--
41+
<?xml version="1.0" encoding="UTF-8" ?>
42+
<container xmlns="http://symfony.com/schema/dic/services"
43+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4344
xmlns:swiftmailer="http://symfony.com/schema/dic/swiftmailer"
44-
http://symfony.com/schema/dic/swiftmailer http://symfony.com/schema/dic/swiftmailer/swiftmailer-1.0.xsd
45-
-->
46-
47-
<swiftmailer:config
48-
transport="smtp"
49-
host="email-smtp.us-east-1.amazonaws.com"
50-
port="465"
51-
encryption="tls"
52-
username="AWS_ACCESS_KEY"
53-
password="AWS_SECRET_KEY" />
45+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
46+
http://symfony.com/schema/dic/swiftmailer http://symfony.com/schema/dic/swiftmailer/swiftmailer-1.0.xsd">
47+
48+
<!-- ... -->
49+
<swiftmailer:config
50+
transport="smtp"
51+
host="email-smtp.us-east-1.amazonaws.com"
52+
port="465"
53+
encryption="tls"
54+
username="AWS_ACCESS_KEY"
55+
password="AWS_SECRET_KEY" />
56+
</container>
5457
5558
.. code-block:: php
5659
5760
// app/config/config.php
5861
$container->loadFromExtension('swiftmailer', array(
59-
'transport' => "smtp",
60-
'host' => "email-smtp.us-east-1.amazonaws.com",
61-
'port' => 465,
62-
'encryption' => "tls",
63-
'username' => "AWS_ACCESS_KEY",
64-
'password' => "AWS_SECRET_KEY",
62+
'transport' => 'smtp',
63+
'host' => 'email-smtp.us-east-1.amazonaws.com',
64+
'port' => 465,
65+
'encryption' => 'tls',
66+
'username' => 'AWS_ACCESS_KEY',
67+
'password' => 'AWS_SECRET_KEY',
6568
));
6669
6770
The ``port`` and ``encryption`` keys are not present in the Symfony Standard
@@ -71,7 +74,7 @@ And that's it, you're ready to start sending emails through the cloud!
7174

7275
.. tip::
7376

74-
If you are using the Symfony Standard Edition, configure the parameters at
77+
If you are using the Symfony Standard Edition, configure the parameters in
7578
``parameters.yml`` and use them in your configuration files. This allows
7679
for different Swift Mailer configurations for each installation of your
7780
application. For instance, use Gmail during development and the cloud in
@@ -95,7 +98,7 @@ And that's it, you're ready to start sending emails through the cloud!
9598

9699
* You have to sign up to `Amazon Web Services (AWS)`_;
97100

98-
* Every sender address used in the ``From`` or ``ReturnPath`` (bounce
101+
* Every sender address used in the ``From`` or ``Return-Path`` (bounce
99102
address) header needs to be confirmed by the owner. You can also
100103
confirm an entire domain;
101104

cookbook/email/gmail.rst

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. index::
22
single: Emails; Gmail
33

4-
How to use Gmail to send Emails
4+
How to use Gmail to Send Emails
55
===============================
66

77
During development, instead of using a regular SMTP server to send emails, you
@@ -29,31 +29,34 @@ In the development configuration file, change the ``transport`` setting to
2929
.. code-block:: xml
3030
3131
<!-- app/config/config_dev.xml -->
32-
33-
<!--
32+
<?xml version="1.0" encoding="UTF-8" ?>
33+
<container xmlns="http://symfony.com/schema/dic/services"
34+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3435
xmlns:swiftmailer="http://symfony.com/schema/dic/swiftmailer"
35-
http://symfony.com/schema/dic/swiftmailer http://symfony.com/schema/dic/swiftmailer/swiftmailer-1.0.xsd
36-
-->
36+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
37+
http://symfony.com/schema/dic/swiftmailer http://symfony.com/schema/dic/swiftmailer/swiftmailer-1.0.xsd">
3738
38-
<swiftmailer:config
39-
transport="gmail"
40-
username="your_gmail_username"
41-
password="your_gmail_password" />
39+
<!-- ... -->
40+
<swiftmailer:config
41+
transport="gmail"
42+
username="your_gmail_username"
43+
password="your_gmail_password" />
44+
</container>
4245
4346
.. code-block:: php
4447
4548
// app/config/config_dev.php
4649
$container->loadFromExtension('swiftmailer', array(
47-
'transport' => "gmail",
48-
'username' => "your_gmail_username",
49-
'password' => "your_gmail_password",
50+
'transport' => 'gmail',
51+
'username' => 'your_gmail_username',
52+
'password' => 'your_gmail_password',
5053
));
5154
5255
You're done!
5356

5457
.. tip::
5558

56-
If you are using the Symfony Standard Edition, configure the parameters at ``parameters.yml``:
59+
If you are using the Symfony Standard Edition, configure the parameters in ``parameters.yml``:
5760

5861
.. code-block:: yaml
5962

cookbook/email/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Email
66

77
email
88
gmail
9+
cloud
910
dev_environment
1011
spool
1112
testing

0 commit comments

Comments
 (0)