-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Splitted swiftmailer configuration to avoid issues when not using smtp
- Loading branch information
Showing
4 changed files
with
58 additions
and
29 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
27 changes: 27 additions & 0 deletions
27
src/Symfony/Bundle/SwiftmailerBundle/Resources/config/smtp.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,27 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
|
||
<container xmlns="http://www.symfony-project.org/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.symfony-project.org/schema/dic/services http://www.symfony-project.org/schema/dic/services/services-1.0.xsd"> | ||
|
||
<parameters> | ||
<parameter key="swiftmailer.transport.smtp.class">Swift_Transport_EsmtpTransport</parameter> | ||
</parameters> | ||
|
||
<services> | ||
<service id="swiftmailer.transport.smtp" class="%swiftmailer.transport.smtp.class%" public="false"> | ||
<argument type="service" id="swiftmailer.transport.buffer" /> | ||
<argument type="collection"> | ||
<argument type="service" id="swiftmailer.transport.authhandler" /> | ||
</argument> | ||
<argument type="service" id="swiftmailer.transport.eventdispatcher" /> | ||
|
||
<call method="setHost"><argument>%swiftmailer.transport.smtp.host%</argument></call> | ||
<call method="setPort"><argument>%swiftmailer.transport.smtp.port%</argument></call> | ||
<call method="setEncryption"><argument>%swiftmailer.transport.smtp.encryption%</argument></call> | ||
<call method="setUsername"><argument>%swiftmailer.transport.smtp.username%</argument></call> | ||
<call method="setPassword"><argument>%swiftmailer.transport.smtp.password%</argument></call> | ||
<call method="setAuthMode"><argument>%swiftmailer.transport.smtp.auth_mode%</argument></call> | ||
</service> | ||
</services> | ||
</container> |
26 changes: 26 additions & 0 deletions
26
src/Symfony/Bundle/SwiftmailerBundle/Resources/config/spool.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,26 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
|
||
<container xmlns="http://www.symfony-project.org/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.symfony-project.org/schema/dic/services http://www.symfony-project.org/schema/dic/services/services-1.0.xsd"> | ||
|
||
<parameters> | ||
<parameter key="swiftmailer.spool.file.class">Swift_FileSpool</parameter> | ||
|
||
<parameter key="swiftmailer.plugin.redirecting.class">Swift_Plugins_RedirectingPlugin</parameter> | ||
<parameter key="swiftmailer.plugin.blackhole.class">Swift_Plugins_BlackholePlugin</parameter> | ||
</parameters> | ||
|
||
<services> | ||
<service id="swiftmailer.transport.spool" class="Swift_Transport_SpoolTransport" public="false"> | ||
<argument type="service" id="swiftmailer.transport.eventdispatcher" /> | ||
<argument type="service" id="swiftmailer.spool" /> | ||
</service> | ||
|
||
<service id="swiftmailer.spool.file" class="%swiftmailer.spool.file.class%" public="false"> | ||
<argument>%swiftmailer.spool.file.path%</argument> | ||
</service> | ||
|
||
<service id="swiftmailer.spool" alias="swiftmailer.spool.file" public="false" /> | ||
</services> | ||
</container> |
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