Comments

levelos’s picture

Status: Active » Fixed

The 2.x branch, with an official release coming soon, uses the "official API". In the meantime, any reason why you're using both? The API wrapper bundled with the module already includes complete coverage for the API.

sivaji_ganesh_jojodae’s picture

We want rejects list from Mandrill (as to remove the hard bounced emails from simplenews) and per email address based webhooks action which we think as not supported by Mandrill class shipped with the module.

sivaji_ganesh_jojodae’s picture

Thanks for the 2.x branch. Hope we will use it for the next iteration of the project.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

j0rd’s picture

I've taken a look at the mandrill API implementation in packagist and it appears the 2.x version of the Drupal module does not use this version. So I'm confused. Perhaps it only uses a subset of the packagist stuff? NVM, found that you're using the /libraries/ module in 2.x

I'm also running into conflicts with regards to namespace.

Since MailSystem and drupal_mail are simply structured differently than how mandrill functions, there's cases where you want/need to use the full raw API.

One use case is the use of merge variables. Currently we're using mandrill to send all our transactional emails, but now are developing our weekly bulk newsletter sending with mandrill and for this we'll need merge variables and other features like emails scheduling and pulling data down from the mandrill api to make more informed about our readership & users.

j0rd’s picture

Does it not make sense to put the full mandrill library in the /libraries/ folder, and then use it. So it can also be updated independently of the module (providing library versions are backwards compatible)

Hands faster than brain. Sorry.

j0rd’s picture

I just looked at class Mandrill() in /lib/ folder and I can see this was custom written for the Drupal module as it includes drupal specific functions.

I see the 2.x version is using another "DrupalMandrill" namespace to not conflict as the solution.

I'm going to personally backport that change into my 1.x version, so I can include the library with out problems.

Perhaps it would be wise to start following a D8 namespace in the 2.x branch, to avoid extra work in the future.

Hands faster than brain. Sorry.

sivaji_ganesh_jojodae’s picture

Glad! I'm not alone in this pitfall :) But I'm fortunate, as for the current release we found a workaround by extending the Mandrill class defined in /lib/mandrill.inc, in our custom module. The extended class will have methods forked from official library. So whenever / wherever additional api methods needed we will use our extended class. This could be cumbersome in long run, looking forward to a standard fix soon.