4
4
How to Send an Email
5
5
====================
6
6
7
- Sending emails is a common task for any web application and one that has
8
- special complications and potential pitfalls. Symfony provides a mailer feature
9
- based on the popular `Swift Mailer `_ library via the `SwiftMailerBundle `_.
10
-
11
- The Symfony mailer supports sending messages with your own mail servers as well
12
- as using popular email providers like `Mandrill `_, `SendGrid `_, and `Amazon SES `_.
7
+ Symfony provides a mailer feature based on the popular `Swift Mailer `_ library
8
+ via the `SwiftMailerBundle `_. This mailer supports sending messages with your
9
+ own mail servers as well as using popular email providers like `Mandrill `_,
10
+ `SendGrid `_, and `Amazon SES `_.
13
11
14
12
Installation
15
13
------------
@@ -22,21 +20,21 @@ install and enable the mailer:
22
20
$ composer require mailer
23
21
24
22
If your application doesn't use Symfony Flex, follow the installation
25
- instructions of the `SwiftMailerBundle `_.
23
+ instructions on `SwiftMailerBundle `_.
26
24
27
25
.. _swift-mailer-configuration :
28
26
29
27
Configuration
30
28
-------------
31
29
32
- The ``config/packages/swiftmailer.yaml `` file created when installing the mailer
33
- provides all the initial config needed to make it work , except the parameters
34
- required to connect to the mail server . Those parameters are defined in the
35
- `` MAILER_URL `` environment variable in the ``.env `` file:
30
+ The ``config/packages/swiftmailer.yaml `` file that's created when installing the
31
+ mailer provides all the initial config needed to send emails , except your mail
32
+ server connection details . Those parameters are defined in the `` MAILER_URL ``
33
+ environment variable in the ``.env `` file:
36
34
37
35
.. code-block :: bash
38
36
39
- # use this to disable the email delivery
37
+ # use this to disable email delivery
40
38
MAILER_URL=null://localhost
41
39
42
40
# use this to send emails via Gmail (don't use this in production)
0 commit comments