Skip to content

Commit

Permalink
NEW Migrate from swiftmailer/swiftmailer to symfony/mailer
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Oct 17, 2022
1 parent 83a09da commit 795cd5b
Show file tree
Hide file tree
Showing 20 changed files with 843 additions and 2,085 deletions.
12 changes: 0 additions & 12 deletions _config/email.yml

This file was deleted.

34 changes: 34 additions & 0 deletions _config/mailer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
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']]
---
Name: mailer-dsn-default-config
---
SilverStripe\Core\Injector\Injector:
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:
- 'mailer-dsn-default-config'
- 'mailer-dsn-project-config'
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 795cd5b

Please sign in to comment.