Skip to content

Mandrill - Add ability to re-send emails on API errors #157

Open
@ihor-sviziev

Description

@ihor-sviziev

Hi,

We started using this module on our projects. Few times got error and as result email wasn't sent:

exception 'Mandrill_Error' with message 'We were unable to decode the JSON response from the Mandrill API: <html><body><h1>504 Gateway Time-out</h1>
The server didn't respond in time.
</body></html>

' in /my_project/magento/lib/Mandrill/Mandrill.php:156
Stack trace:
#0 /my_project/magento/lib/Mandrill/Mandrill/Senders.php(54): Mandrill_Mandrill->call('senders/domains', Array)
#1 /my_project/magento/app/code/community/Ebizmarts/MailChimp/Model/Email/Template.php(89): Mandrill_Senders->domains()
#2 /my_project/magento/app/code/core/Mage/Core/Model/Email/Template.php(508): Ebizmarts_MailChimp_Model_Email_Template->send(Array, Array, Array)
...

I know that these errors actually not related to your module, but I think this module could handle them better.

As a suggestion - would be great to separate server errors, connection errors and API errors (incorrect credentials, limit exceeded, etc.). In case of server errors - try to re-send request (would be great to have at least 3 attempts).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions