1
1
.. index ::
2
- single: Emails; Cloud
2
+ single: Emails; Using the cloud
3
3
4
- How to use the Cloud to send Emails
4
+ How to use the Cloud to Send Emails
5
5
===================================
6
6
7
7
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``:
38
38
.. code-block :: xml
39
39
40
40
<!-- 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"
43
44
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 >
54
57
55
58
.. code-block :: php
56
59
57
60
// app/config/config.php
58
61
$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' ,
65
68
));
66
69
67
70
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!
71
74
72
75
.. tip ::
73
76
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
75
78
``parameters.yml `` and use them in your configuration files. This allows
76
79
for different Swift Mailer configurations for each installation of your
77
80
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!
95
98
96
99
* You have to sign up to `Amazon Web Services (AWS) `_;
97
100
98
- * Every sender address used in the ``From `` or ``ReturnPath `` (bounce
101
+ * Every sender address used in the ``From `` or ``Return-Path `` (bounce
99
102
address) header needs to be confirmed by the owner. You can also
100
103
confirm an entire domain;
101
104
0 commit comments