使用JS-Zimbra错误在zimbra中发送电子邮件

时间:2016-06-23 13:36:14

标签: javascript node.js soap zimbra

我尝试使用js-zimbra模块进行搜索任务,我继续收到一条我不知道如何解决的错误,

她的代码:

var z = require('js-zimbra');

var comm = new z.Communication({
  url: "myzimbraurl/service/soap"
});

// Authenticate

comm.auth({
   "username": "user",
    "secret": "pass",
    "isPassword": true
}, function(err) {
    if (err) {
    // An error occured authenticating!        
}
console.log('done !')
    // Now, carry on creating requests and sending them
comm.getRequest({}, function(err, req) {
    if (err) {
        // Can't create a new request
    }
    req.addRequest({
        name: "SearchRequest",
        namespace: "zimbraMail",
        params: {
            "SearchRequest" : {
                "types" : "message",
                "fetch" : "all"     
            },
            "query": {
                "_content": "in:inbox"
            }
        }
    }, function(err) {

        if (err) {
            console.log('err', err);
        }
        comm.send(req, function(err, res) {
            if (err) {
                console.log('err', err);
            }
            console.log(res);
        })
      })
    })
 });

当我执行时,我收到以下错误消息:

  

错误:收到服务器错误:{" Code":{" Value":" soap:Receiver"}," Reason": {"文字":"代理对目标服务器的请求时出错:连接重置"},"详细信息":{"错误":{& #34;代码":" service.PROXY_ERROR""痕量":""" _jsns":"瓮:Zimbra的"}}}

是否有针对此类错误的修复程序?

0 个答案:

没有答案