8000 Improve readability · web-dev/symfony-docs@4e9fc3e · GitHub
[go: up one dir, main page]

Skip to content

Commit 4e9fc3e

Browse files
johnkaryweaverryan
authored andcommitted
Improve readability
1 parent cb475e0 commit 4e9fc3e

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

cookbook/email/dev_environment.rst

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
How to Work with Emails During Development
22
==========================================
33

4-
When you are creating an application which sends emails, you will often
5-
not want to actually send the emails to the specified recipient while
4+
When developing an application which sends email, you will often
5+
not want to actually send the email to the specified recipient during
66
development. If you are using the ``SwiftmailerBundle`` with Symfony2, you
77
can easily achieve this through configuration settings without having to
88
make any changes to your application's code at all. There are two main
9-
choices when it comes to handling emails during development: (a) disabling the
10-
sending of emails altogether or (b) sending all the emails to a specified
9+
choices when it comes to handling email during development: (a) disabling the
10+
sending of email altogether or (b) sending all email to a specific
1111
address.
1212

1313
Disabling Sending
1414
-----------------
1515

16-
You can disable sending emails by setting the ``disable_delivery`` option
16+
You can disable sending email by setting the ``disable_delivery`` option
1717
to ``true``. This is the default in the ``test`` environment in the Standard
18-
distribution. If you do this in the ``test`` specific config then emails
18+
distribution. If you do this in the ``test`` specific config then email
1919
will not be sent when you run tests, but will continue to be sent in the
2020
``prod`` and ``dev`` environments:
2121

@@ -47,12 +47,12 @@ will not be sent when you run tests, but will continue to be sent in the
4747
));
4848
4949
If you'd also like to disable deliver in the ``dev`` environment, simply
50-
add this configuration to the ``config_dev.yml`` file.
50+
add this same configuration to the ``config_dev.yml`` file.
5151

5252
Sending to a Specified Address
5353
------------------------------
5454

55-
You can also choose to have all emails sent to a specific address, instead
55+
You can also choose to have all email sent to a specific address, instead
5656
of the address actually specified when sending the message. This can be done
5757
via the ``delivery_address`` option:
5858

@@ -101,9 +101,8 @@ Now, suppose you're sending an email to ``recipient@example.com``.
101101
}
102102
103103
In the ``dev`` environment, the email will instead be sent to ``dev@example.com``.
104-
Swiftmailer will add an extra header to the email, ``X-Swift-To`` containing
105-
the replaced address, so you will still be able to see who it would have been
106-
sent to.
104+
Swiftmailer will add an extra header to the email, ``X-Swift-To``, containing
105+
the replaced address, so you can still see who it would have been sent to.
107106

108107
.. note::
109108

@@ -116,11 +115,15 @@ sent to.
116115
Viewing from the Web Debug Toolbar
117116
----------------------------------
118117

119-
You can view any emails sent by a page when you are in the ``dev`` environment
120-
using the Web Debug Toolbar. The email icon in the toolbar will show how
121-
many emails were sent. If you click it, a report showing the details of the
122-
emails will open.
118+
You can view any email sent during a single response when you are in the
119+
``dev`` environment using the Web Debug Toolbar. The email icon in the toolbar
120+
will show how many emails were sent. If you click it, a report will open
121+
showing the details of the sent emails.
123122

124-
If you're sending an email and then redirecting immediately after, you'll
125-
need to set the ``intercept_redirects`` option to ``true`` in the ``config_dev.yml``
126-
file so that you can see the email in the web debug toolbar before being redirected.
123+
If you're sending an email and then immediately redirecting to another page,
124+
the web debug toolbar will not display an email icon or a report on the next
125+
page.
126+
127+
Instead, you'll need to set the ``intercept_redirects`` option to ``true`` in
128+
the ``config_dev.yml`` file, which will cause the redirect to stop and allow
129+
you to open the report with details of the sent emails.

0 commit comments

Comments
 (0)
0