• Hi,

    I’m unable to send mails using Maildrill and the EasyReservation plugin:
    http://wordpress.org/extend/plugins/easyreservations/

    I configured Mandrill using an API key. It seems to work just fine for WordPress actions. Emails (like new user registration) are sent succesfully via mail270.us4.mandrillapp.com (vissible in Gmail).

    easyReservations sends mails using the wp_mail function. (lib/classes/reservation.class.php line 949) I was excepting Mandrill would step in and take over sending-process. Instead, the mail is sent via my own webserver. No errors are shown. (Just like when Mandrill-plugin would not be active)

    I’m using a fresh install of WP3.5, Only easyReservation and Mandrill activated. I did install Contact form 7, to test a 3-party plugin. This worked fine. CF7 now deactivated.

    Since this is probably no really a Mandrill-issue, I can only ask for:
    A. Is anyone using Mandrill and easyReservation? Working fine?
    B. How can I debug this problem? Where do I start looking?

    Any help is welcome!
    Thx!

    http://wordpress.org/extend/plugins/wpmandrill/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author MC_Will

    (@mc_will)

    Hi,

    Sorry for the delay!

    EasyReservations seems to be adding some headers that might not be recognized by Mandrill:
    http://plugins.trac.wordpress.org/browser/easyreservations/trunk/lib/classes/reservation.class.php#L943

    In that case, wpMandrill defaults to the regular wp_mail function.

    You should be able to modify their request on-the-fly by using the wordpress filter ‘mandrill_payload’.

    Thread Starter tstruyf

    (@tstruyf)

    I tried adding this in my themes fucntions.php:

    /* WP MANDRILL FILTER */
    add_filter('mandrill_payload','mandrill_add_reply_to');
    function mandrill_add_reply_to($message) {
       // die('test');
        $message['headers']['Reply-To'] = $message['from_email'];
        $message['from_name'] = 'My test';
        $message['from_email']= 'info@myregistereddomain.be';
        return $message;
    }

    The mails are still sent via my server. Nothing changes, No errors are shown. (Checked php-logs) I know the function mandrill_add_reply_to() is being called, because uncommenting die() works.

    I solved this hardcoded by manualy replacing the wp_mail call in the plugin:

    //$mail = @wp_mail($to,$subj,$msg,$headers, $attachment);
    $mail = wp_mail($to,$subj,$msg,’From: My test <info@myregistereddomain.be>’);

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Mandrill and easyReservations’ is closed to new replies.