dotmailer / dotmailer-magento2-extension

The official Dotdigital for Magento2 extension
https://dotdigital.com/integrations/magento
MIT License
49 stars 63 forks source link

try/catch should be used to handle failures in unreliable transports #492

Closed jonpday closed 6 years ago

jonpday commented 6 years ago

the SMTP Adapter naively assumes that SMTP send will always complete successfully. Instead, it should use try/catch to handle the failure gracefully, preferably with a retry and/or admin notification. ref https://github.com/dotmailer/dotmailer-magento2-extension/blob/7949b9955af34bc6e280cd129ed5d4706a49d36e/Model/Mail/Transport.php#L29

jonpday commented 6 years ago

please note that the lack of try/catch means that any exceptions (e.g. timeout) will bubble up and (in the case of new order confirmation emails) result in the customer seeing a JS alert that informs them that their order failed, even though the credit card charge has been processed! This is a major issue, please prioritize the fix.

adeelq commented 6 years ago

@jonpday This has been resolved in v2.5.1. Thanks for reporting this.