Closed (fixed)
Project:
Mandrill
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
16 Dec 2015 at 11:22 UTC
Updated:
24 Apr 2019 at 00:44 UTC
Jump to comment: Most recent, Most recent file
Calling drupal_mail() doesn't return Mandrill API response in any form. It just returns $ret['result'] = TRUE.
It is desirable to receive Mandrill response instead of just TRUE, to get message _id
Example call:
$ret = drupal_mail('my_module', 'my_key', $to, $lang, $params, $from);
Example of Mandril API response:
$ret['result'] = Array
(
[0] => Array
(
[email] => recipient.email@example.com
[status] => sent
[reject_reason] => hard-bounce
[_id] => abc123abc123abc123abc123abc123
)
)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | mandrill-return-api-response-to-caller-on-success-2636166-1.patch | 407 bytes | vdroznik |
Comments
Comment #2
vdroznik commentedA patch providing described functionality
Comment #3
vdroznik commentedComment #4
indytechcook commentedComment #5
fmitchell commentedWorks for me.
Comment #6
fmitchell commentedComment #7
samuel.mortensonComment #8
knyshuk.vova commentedThe patch looks good and applies successfully. +1 for RTBC.
Comment #9
rjacobsen0 commentedI have also verified this is working. Thanks for the good patch! Committing.
Comment #11
rjacobsen0 commented