Mandrill发送API会偶尔对电子邮件进行排队

时间:2015-09-16 21:55:29

标签: api mandrill

我的电子邮件偶尔会排队,而不是使用付费的Mandrill帐户立即发送下载链接 - 有时会快速发送。我希望它在调用API时发送。 Mandrill API控制面板中没有错误。

这段代码大部分时间都是通过Heroku上的节点服务器运行的......我使用javascript Date()方法使用'send_at'参数当前日期。我如何能够始终如一地发送电子邮件 - 有时队列可以是1小时30分钟。

// 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);
    }
);

1 个答案:

答案 0 :(得分:1)

此问题不再是问题。请忽略上述有关时间参数的帖子,因为我正在使用此变量(显然是来自API doc的"send_at")并且Mandrill正在发送。

由于我在启动制作应用程序之前支付了很短的时间,因此这一定是时间的缩影。您必须在Mandrill中支付(设置积分)才能使用send_at参数 - 换句话说,从免费版升级。生效可能需要一些时间。

Mandrill一直在完美地工作,因为这个问题像照明一样快。所以这对我来说不再是一个问题。