Skip to content

Commit

Permalink
Merge pull request #10494 from creative-commoners/pulls/5/symfony-mailer
Browse files Browse the repository at this point in the history
NEW Migrate from swiftmailer/swiftmailer to symfony/mailer
  • Loading branch information
GuySartorelli authored Oct 19, 2022
2 parents 868f790 + 2e85674 commit 919cfcf
Show file tree
Hide file tree
Showing 20 changed files with 828 additions and 2,086 deletions.
12 changes: 0 additions & 12 deletions _config/email.yml

This file was deleted.

28 changes: 28 additions & 0 deletions _config/mailer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
Name: mailer
---
SilverStripe\Core\Injector\Injector:
Symfony\Component\Mailer\MailerInterface:
class: Symfony\Component\Mailer\Mailer
constructor:
transport: '%$Symfony\Component\Mailer\Transport\TransportInterface'
Symfony\Component\EventDispatcher\EventDispatcherInterface.mailer:
class: Symfony\Component\EventDispatcher\EventDispatcher
calls:
- [addSubscriber, ['%$SilverStripe\Control\Email\MailerSubscriber']]
Symfony\Component\Mailer\Transport\TransportInterface:
factory: Symfony\Component\Mailer\Transport
factory_method: fromDsn
constructor:
dsn: 'sendmail://default'
dispatcher: '%$Symfony\Component\EventDispatcher\EventDispatcherInterface.mailer'
---
Name: mailer-dsn-env
After: '*'
Only:
envvarset: MAILER_DSN
---
SilverStripe\Core\Injector\Injector:
Symfony\Component\Mailer\Transport\TransportInterface:
constructor:
dsn: '`MAILER_DSN`'
6 changes: 2 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@
"silverstripe/assets": "^2",
"silverstripe/vendor-plugin": "^2",
"sminnee/callbacklist": "^0.1.1",
"swiftmailer/swiftmailer": "^6.3.0",
"symfony/cache": "^6.1",
"symfony/config": "^6.1",
"symfony/filesystem": "^6.1",
"symfony/mailer": "^6.1",
"symfony/mime": "^6.1",
"symfony/translation": "^6.1",
"symfony/yaml": "^6.1",
"ext-ctype": "*",
Expand Down Expand Up @@ -96,9 +97,6 @@
},
"files": [
"src/includes/constants.php"
],
"classmap": [
"thirdparty/swiftmailer"
]
},
"include-path": [
Expand Down
Loading

0 comments on commit 919cfcf

Please sign in to comment.