MandrillService handleSendResponse() marks mail as failed, even if other recipients received it

Created on 31 October 2017, about 7 years ago
Updated 23 November 2023, 12 months ago

When using the Mandrill module & service to send a mail to multiple recipients, we're frequently getting an error message "Unable to send email. Contact the site administrator if the problem persists.".

After some debugging, this seems caused by the fact that $message['result'] is set to FALSE, because MandrillService::handleSendResponse() returns FALSE if at least one of the entries from the $response array contains an error.

So while Mandrill might have sent the mail to 20 recipients, if the 21st is an invalid email address, the error message is shown regardless.

Rather than this to happen, we want to have the mail message marked as being sent successfully, while we could further take care of an invalid email address through hook_mandrill_mailsend_result(), if needed.

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇧🇪Belgium svendecabooter Gent

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024