Big caveat though, the official v2 transport class is missing plugin and event support. This means that environment settings like SS_SEND_ALL_EMAILS_TO are ignored.
v3 looks better, but requires SwiftMailer v6, and SilverStripe is currently locked to v5. So I forked the repo and cherry picked some commits to make a franken-version compatible with SilverStripe 4.2 that supports the beforeSend event. If you want to use it too, edit your composer.json as such:
Getting this working on SS4 was trickier than I expected so I’m sharing my process in case it helps other Postmark fans
Update: If you need guzzle 7 you can use the swift5-guzzle7 branch. It’s a tiny change and I could probably merge that in to the swift-5 branch but I like to play it safe.
Should do. The ‘dev-swift5’ branch is on my fork, not the original repo. It’s here. You need the repositories entry in your composer.json file to pick it up.
This fork is still working well to enable Postmark on Silverstripe 4, including 4.7. However, it appears that no sending errors are caught and it fails silently, usually reporting an email has been sent, when in fact it hasn’t.
@purplespider ah that’s a bummer. v2 of wildbit/swiftmailer-postmark seemed to be missing some major pieces… hate to think what v1 looked like .
Hard to say if that commit can be dropped in as it’s from the next major version of wildbit/swiftmailer-postmarkand the next major version of SwiftMailer.
If you have a chance, I would just drop it in and see what happens. If it works feel free to open a PR on my repo to add more stitches to this franken-version.