Built motion from commit 5abd8a399.|1.0.22
[motion.git] / server / config / smtp / index.js
1 var _0xc1cb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6D\x61\x69\x6C","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x65\x72\x72\x6F\x72","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x28\x25\x73\x20\x2D\x20\x25\x73\x29\x20\x45\x52\x52\x4F\x52","\x66\x6F\x72\x6D\x61\x74","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x28\x25\x73\x20\x2D\x20\x25\x73\x29\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73","\x69\x6E\x66\x6F","\x6D\x65\x73\x73\x61\x67\x65","\x74\x79\x70\x65","\x75\x70\x64\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6D\x73\x67\x49\x64","\x73\x74\x61\x74\x65","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x73\x6F\x75\x72\x63\x65","\x2F\x73\x6D\x74\x70","\x66\x6F\x72\x6B","\x65\x78\x70\x6F\x72\x74\x73","\x65\x78\x69\x74","\x73\x6D\x74\x70","\x6B\x69\x6C\x6C","\x67\x65\x74","\x66\x72\x6F\x6D","\x72\x65\x74\x72\x79\x53\x65\x6E\x64","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x53\x45\x4E\x44\x49\x4E\x47","\x72\x65\x74\x72\x79","\x68\x74\x6D\x6C","\x75\x74\x66\x38","\x74\x65\x78\x74","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x69\x64","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x66\x69\x6E\x64","\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x49\x64","\x61\x64\x64\x72\x65\x73\x73","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x28\x25\x73\x20\x2D\x20\x25\x73\x29\x20\x55\x50\x44\x41\x54\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x70\x69\x64","\x68\x6F\x73\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x70\x6F\x72\x74","\x73\x73\x6C","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x28\x25\x73\x20\x2D\x20\x25\x73\x29\x20\x44\x45\x53\x54\x52\x4F\x59\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C"];_0xc1cb[0];var util=require(_0xc1cb[1]);var _=require(_0xc1cb[2]);var cp=require(_0xc1cb[3]);var ms=require(_0xc1cb[5])[_0xc1cb[4]];var msg=require(_0xc1cb[5])[_0xc1cb[6]];var rm=require(_0xc1cb[5])[_0xc1cb[7]];var ma=require(_0xc1cb[5])[_0xc1cb[8]];var logger=require(_0xc1cb[10])(_0xc1cb[9]);function fork(_0x13ccxa,_0x13ccxb,_0x13ccxc){return cp[_0xc1cb[31]](__dirname+ _0xc1cb[30],[_0x13ccxa,_0x13ccxb])[_0xc1cb[14]](_0xc1cb[18],function(_0x13ccxf){if(_0x13ccxf[_0xc1cb[19]]=== _0xc1cb[20]){return msg[_0xc1cb[24]](_0x13ccxf[_0xc1cb[25]])[_0xc1cb[22]](function(_0x13ccx11){return _0x13ccx11[_0xc1cb[20]](_0x13ccxf)})[_0xc1cb[22]](function(){return rm[_0xc1cb[24]](_0x13ccxf[_0xc1cb[23]])})[_0xc1cb[22]](function(_0x13ccx10){return _0x13ccx10[_0xc1cb[20]]({lastEvent:_0x13ccxf[_0xc1cb[21]]})})};if(_0x13ccxf[_0xc1cb[19]]=== _0xc1cb[26]){return ms[_0xc1cb[24]](_0x13ccxa)[_0xc1cb[22]](function(_0x13ccx12){return _0x13ccx12[_0xc1cb[20]]({state:_0x13ccxf[_0xc1cb[26]],source:_0x13ccxf[_0xc1cb[29]]|| null})})[_0xc1cb[28]](function(_0x13ccxd){logger[_0xc1cb[11]](_0x13ccxd[_0xc1cb[27]])})}})[_0xc1cb[14]](_0xc1cb[15],function(_0x13ccxe){logger[_0xc1cb[17]](util[_0xc1cb[13]](_0xc1cb[16],_0x13ccxa,_0x13ccxc,_0x13ccxb,_0x13ccxe))})[_0xc1cb[14]](_0xc1cb[11],function(_0x13ccxd){logger[_0xc1cb[11]](util[_0xc1cb[13]](_0xc1cb[12],_0x13ccxa,_0x13ccxc,_0x13ccxb),_0x13ccxd)})}module[_0xc1cb[32]]= function(){var _0x13ccx13={};process[_0xc1cb[14]](_0xc1cb[33],function(_0x13ccxe){for(var _0x13ccx14 in _0x13ccx13){if(_0x13ccx13[_0x13ccx14][_0xc1cb[34]]){_0x13ccx13[_0x13ccx14][_0xc1cb[34]][_0xc1cb[35]]()}}});msg[_0xc1cb[40]](function(_0x13ccx11){_0x13ccx11= _0x13ccx11[_0xc1cb[36]]({plain:true});if(_0x13ccx13[_0x13ccx11[_0xc1cb[37]]]){_0x13ccx11[_0xc1cb[19]]= _0xc1cb[18];_0x13ccx11[_0xc1cb[38]]= 0;_0x13ccx13[_0x13ccx11[_0xc1cb[37]]][_0xc1cb[34]][_0xc1cb[39]](_0x13ccx11)}});msg[_0xc1cb[47]](function(_0x13ccx11){if(_0x13ccx11[_0xc1cb[41]](_0xc1cb[21])&& _0x13ccx11[_0xc1cb[21]]=== _0xc1cb[42]){_0x13ccx11= _0x13ccx11[_0xc1cb[36]]({plain:true});if(_0x13ccx13[_0x13ccx11[_0xc1cb[37]]]){_0x13ccx11[_0xc1cb[19]]= _0xc1cb[18];_0x13ccx11[_0xc1cb[38]]= _0x13ccx11[_0xc1cb[43]]+ 1;_0x13ccx11[_0xc1cb[44]]= _0x13ccx11[_0xc1cb[44]]?_0x13ccx11[_0xc1cb[44]].toString(_0xc1cb[45]):null;_0x13ccx11[_0xc1cb[46]]= _0x13ccx11[_0xc1cb[46]]?_0x13ccx11[_0xc1cb[46]].toString(_0xc1cb[45]):null;_0x13ccx13[_0x13ccx11[_0xc1cb[37]]][_0xc1cb[34]][_0xc1cb[39]](_0x13ccx11)}}});ms[_0xc1cb[40]](function(_0x13ccx12){if(_0x13ccx12[_0xc1cb[48]]&& _0x13ccx12[_0xc1cb[49]]){var _0x13ccx15=_[_0xc1cb[51]](_0x13ccx13,{mailAccountId:_0x13ccx12[_0xc1cb[50]]});if(_0x13ccx15){_0x13ccx15[_0xc1cb[52]]= _0x13ccx12[_0xc1cb[48]];_0x13ccx15[_0xc1cb[49]]= _0x13ccx12[_0xc1cb[49]];_0x13ccx15[_0xc1cb[34]]= fork(_0x13ccx12[_0xc1cb[48]],_0x13ccx12[_0xc1cb[49]],_0x13ccx15[_0xc1cb[53]])}}});ma[_0xc1cb[40]](function(_0x13ccx16){if(_0x13ccx16[_0xc1cb[48]]&& _0x13ccx16[_0xc1cb[53]]){_0x13ccx13[_0x13ccx16[_0xc1cb[53]]]= {mailAccountId:_0x13ccx16[_0xc1cb[48]],address:_0x13ccx16[_0xc1cb[53]]}}});ma[_0xc1cb[47]](function(_0x13ccx16){if(_0x13ccx16[_0xc1cb[41]](_0xc1cb[53])){var _0x13ccx15=_[_0xc1cb[51]](_0x13ccx13,{mailAccountId:_0x13ccx16[_0xc1cb[48]]});if(_0x13ccx15){var _0x13ccx17=_0x13ccx15[_0xc1cb[52]];var _0x13ccxb=_0x13ccx15[_0xc1cb[49]];var _0x13ccxc=_0x13ccx15[_0xc1cb[53]];_0x13ccx15[_0xc1cb[34]][_0xc1cb[35]]();_0x13ccx15= null;delete _0x13ccx13[_0x13ccxc];_0x13ccx13[_0x13ccx16[_0xc1cb[53]]]= {mailAccountId:_0x13ccx16[_0xc1cb[48]],mailServerOutId:_0x13ccx17,address:_0x13ccx16[_0xc1cb[53]],username:_0x13ccxb,smtp:fork(_0x13ccx17,_0x13ccxb,_0x13ccx16[_0xc1cb[53]])};logger[_0xc1cb[17]](util[_0xc1cb[13]](_0xc1cb[54],_0x13ccx17,_0x13ccx16[_0xc1cb[53]],_0x13ccxb,_0x13ccx13[_0x13ccx16[_0xc1cb[53]]][_0xc1cb[34]][_0xc1cb[55]]))}}});ms[_0xc1cb[47]](function(_0x13ccx12){var _0x13ccx15=_[_0xc1cb[51]](_0x13ccx13,{mailAccountId:_0x13ccx12[_0xc1cb[50]]});if(_0x13ccx15){if((!_0x13ccx12[_0xc1cb[41]](_0xc1cb[26])&&  !_0x13ccx12[_0xc1cb[41]](_0xc1cb[29])) || _0x13ccx12[_0xc1cb[41]](_0xc1cb[56]) || _0x13ccx12[_0xc1cb[41]](_0xc1cb[49]) || _0x13ccx12[_0xc1cb[41]](_0xc1cb[57]) || _0x13ccx12[_0xc1cb[41]](_0xc1cb[58]) || _0x13ccx12[_0xc1cb[41]](_0xc1cb[59])){_0x13ccx15[_0xc1cb[34]][_0xc1cb[35]]();_0x13ccx15[_0xc1cb[34]]= null;_0x13ccx15[_0xc1cb[49]]= _0x13ccx12[_0xc1cb[49]];_0x13ccx15[_0xc1cb[34]]= fork(_0x13ccx15[_0xc1cb[52]],_0x13ccx12[_0xc1cb[49]],_0x13ccx15[_0xc1cb[53]]);logger[_0xc1cb[17]](util[_0xc1cb[13]](_0xc1cb[54],_0x13ccx12[_0xc1cb[48]],_0x13ccx15[_0xc1cb[53]],_0x13ccx15[_0xc1cb[49]],_0x13ccx15[_0xc1cb[34]][_0xc1cb[55]]))}else {_0x13ccx15[_0xc1cb[34]][_0xc1cb[39]]({type:_0xc1cb[26],state:_0x13ccx12[_0xc1cb[26]],source:_0x13ccx12[_0xc1cb[29]],username:_0x13ccx12[_0xc1cb[49]]})}}});ms[_0xc1cb[61]](function(_0x13ccx12){var _0x13ccx15=_[_0xc1cb[51]](_0x13ccx13,{mailAccountId:_0x13ccx12[_0xc1cb[50]]});if(_0x13ccx15){logger[_0xc1cb[17]](util[_0xc1cb[13]](_0xc1cb[60],_0x13ccx12[_0xc1cb[48]],_0x13ccx15[_0xc1cb[53]],_0x13ccx15[_0xc1cb[49]],_0x13ccx15[_0xc1cb[34]][_0xc1cb[55]]));var _0x13ccxc=_0x13ccx15[_0xc1cb[53]];_0x13ccx15[_0xc1cb[34]][_0xc1cb[35]]();_0x13ccx15= null;delete _0x13ccx13[_0x13ccxc]}});ma[_0xc1cb[61]](function(_0x13ccx16){var _0x13ccx15=_[_0xc1cb[51]](_0x13ccx13,{mailAccountId:_0x13ccx16[_0xc1cb[48]]});if(_0x13ccx15){logger[_0xc1cb[17]](util[_0xc1cb[13]](_0xc1cb[60],_0x13ccx15[_0xc1cb[52]],_0x13ccx15[_0xc1cb[53]],_0x13ccx15[_0xc1cb[49]],_0x13ccx15[_0xc1cb[34]][_0xc1cb[55]]));var _0x13ccxc=_0x13ccx15[_0xc1cb[53]];_0x13ccx15[_0xc1cb[34]][_0xc1cb[35]]();_0x13ccx15= null;delete _0x13ccx13[_0x13ccxc]}});ma[_0xc1cb[63]]({include:[{model:ms,attributes:[_0xc1cb[48],_0xc1cb[49]],raw:true}],attributes:[_0xc1cb[48],_0xc1cb[53]]})[_0xc1cb[22]](function(_0x13ccx18){_0x13ccx18[_0xc1cb[62]](function(_0x13ccx16){_0x13ccx16= _0x13ccx16[_0xc1cb[36]]({plain:true});if(_0x13ccx16[_0xc1cb[4]]){_0x13ccx13[_0x13ccx16[_0xc1cb[53]]]= {mailAccountId:_0x13ccx16[_0xc1cb[48]],mailServerOutId:_0x13ccx16[_0xc1cb[4]][_0xc1cb[48]],address:_0x13ccx16[_0xc1cb[53]],username:_0x13ccx16[_0xc1cb[4]][_0xc1cb[49]],smtp:fork(_0x13ccx16[_0xc1cb[4]][_0xc1cb[48]],_0x13ccx16[_0xc1cb[4]][_0xc1cb[49]],_0x13ccx16[_0xc1cb[53]])}}})})[_0xc1cb[28]](function(_0x13ccxd){logger[_0xc1cb[11]](_0x13ccxd)})}