mediabeastnz / craft-commerce-abandoned-cart

Abandoned Cart plugin for Craft Commerce 2
Other
1 stars 15 forks source link

Support custom mailer component #56

Closed samhibberd closed 2 years ago

samhibberd commented 3 years ago

Hi @mediabeastnz, we use a custom mailer component to handle all emails, would love it if you could support this by using the loaded mailer config to compose the new message.

I think you would just need to replace the $newEmail = new Message(); here:

https://github.com/mediabeastnz/craft-commerce-abandoned-cart/blob/27a7c5ade8cdb9338e4b15a3888c04cf3be26f07/src/services/Carts.php#L325-L329

with:

$newEmail = Craft::$app->getMailer()->compose();

mediabeastnz commented 2 years ago

Done in 2.0.1