-
-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make it possible to use multiple to_email in XML
The Configuration class allows to configure more than one recipient. Since the to_email field was configured with XML configurations as an attribute couldn't be specified multiple times.
- Loading branch information
Showing
6 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Tests/DependencyInjection/Fixtures/xml/multiple_email_recipients.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:monolog="http://symfony.com/schema/dic/monolog" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd | ||
http://symfony.com/schema/dic/monolog http://symfony.com/schema/dic/monolog/monolog-1.0.xsd"> | ||
|
||
<monolog:config> | ||
<monolog:handler | ||
name="swift" | ||
type="swift_mailer" | ||
from-email="error@example.com" | ||
subject="An Error Occurred!" | ||
level="debug"> | ||
|
||
<monolog:to-email>dev1@example.com</monolog:to-email> | ||
<monolog:to-email>dev2@example.com</monolog:to-email> | ||
</monolog:handler> | ||
</monolog:config> | ||
</container> |
17 changes: 17 additions & 0 deletions
17
Tests/DependencyInjection/Fixtures/xml/single_email_recipient.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:monolog="http://symfony.com/schema/dic/monolog" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd | ||
http://symfony.com/schema/dic/monolog http://symfony.com/schema/dic/monolog/monolog-1.0.xsd"> | ||
|
||
<monolog:config> | ||
<monolog:handler | ||
name="swift" | ||
type="swift_mailer" | ||
from-email="error@example.com" | ||
to-email="error@example.com" | ||
subject="An Error Occurred!" | ||
level="debug" /> | ||
</monolog:config> | ||
</container> |
8 changes: 8 additions & 0 deletions
8
Tests/DependencyInjection/Fixtures/yml/multiple_email_recipients.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
monolog: | ||
handlers: | ||
swift: | ||
type: swift_mailer | ||
from_email: error@example.com | ||
to_email: [dev1@example.com, dev2@example.com] | ||
subject: An Error Occurred! | ||
level: debug |
8 changes: 8 additions & 0 deletions
8
Tests/DependencyInjection/Fixtures/yml/single_email_recipient.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
monolog: | ||
handlers: | ||
swift: | ||
type: swift_mailer | ||
from_email: error@example.com | ||
to_email: error@example.com | ||
subject: An Error Occurred! | ||
level: debug |