user5237222
user5237222

Reputation: 31

Mandrill send API will queue email occasionally

My email will occasionally get queued instead of sending download link immediately using a paid Mandrill account- other times it will send quickly. I would like it to be send at time of calling the API. The are no errors in the Mandrill API control panel.

This code works great most of the time via a node server on Heroku...I am using 'send_at' parameter w current Date using the javascript Date() method. How can I send an email consistently - sometimes queues can be 1 hour 30 min long.

// Text version of message
me_data.text += message;

// Html for message
me_data.html = results['html'];

// current Date for sending
var sendDate = new Date();

mandrill_client.messages.send(
    {"message": me_data, "async": async, "ip_pool": ip_pool, "send_at": sendDate}, 
    function (result) {
        console.log(result);
        //success 
    }, 
    function (e) {
        //_____________________________Error
        console.log('A mandrill error occurred: ' + e.name + ' - ' + e.message);
    }
);

Upvotes: 0

Views: 413

Answers (1)

user5237222
user5237222

Reputation: 31

This issue is no longer a problem. Please ignore the above posts about the time parameter as I am using this variable (clearly "send_at" from API doc) and Mandrill is sending.

This must have been a fluke of timing as I had paid a short time before launching production app. You have to pay (set credits) in Mandrill to use the send_at parameter - in other words upgrade from the free version. It may take some time to come into effect.

Mandrill has been working flawlessly since this issue like quick as lighting. So this is not an issue any longer for my stuff.

Upvotes: 1

Related Questions