Built motion from commit 78ef1e9a0.|1.0.36
[motion.git] / server / config / smtp / smtp.js
index 3944138..5971f32 100644 (file)
@@ -1 +1 @@
-var _0x1c96=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72\x2D\x73\x6D\x74\x70\x2D\x74\x72\x61\x6E\x73\x70\x6F\x72\x74","\x68\x74\x6D\x6C\x2D\x74\x6F\x2D\x74\x65\x78\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73","\x61\x72\x67\x76","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x74\x79\x70\x65","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x74\x61\x74\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x43\x4F\x4E\x4E\x45\x43\x54\x49\x4E\x47","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x53\x54\x41\x52\x54\x49\x4E\x47\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x70\x69\x64","\x45\x52\x52\x4F\x52","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x52\x52\x4F\x52\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x73\x65\x6E\x64","\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x76\x65\x72\x69\x66\x79","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x73\x6C","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x72\x65\x61\x74\x65\x54\x72\x61\x6E\x73\x70\x6F\x72\x74","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x49\x64","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x53\x45\x4E\x44\x49\x4E\x47\x20\x4D\x53\x47\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x73\x74\x61\x74\x75\x73","\x53\x45\x4E\x44\x49\x4E\x47","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x75\x70\x64\x61\x74\x65","\x46\x41\x49\x4C\x45\x44","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x53\x45\x4E\x54","\x66\x72\x6F\x6D","\x74\x6F","\x63\x63","\x73\x75\x62\x6A\x65\x63\x74","\x68\x74\x6D\x6C","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x70\x61\x74\x68","\x6E\x61\x6D\x65","\x6D\x61\x70","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x61\x64\x64\x55\x73\x65\x72","\x6D\x61\x69\x6C\x4F\x75\x74","\x61\x64\x64\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x66\x69\x6E\x64\x4F\x6E\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x3B","\x6A\x6F\x69\x6E","\x4F\x50\x45\x4E","\x55\x73\x65\x72\x49\x64","\x63\x72\x65\x61\x74\x65"];_0x1c96[0];var util=require(_0x1c96[1]);var promise=require(_0x1c96[2]);var _=require(_0x1c96[3]);var nodemailer=require(_0x1c96[4]);var smtpTransport=require(_0x1c96[5]);var htmlToText=require(_0x1c96[6]);var Room=require(_0x1c96[8])[_0x1c96[7]];var Account=require(_0x1c96[8])[_0x1c96[9]];var Message=require(_0x1c96[8])[_0x1c96[10]];var Server=require(_0x1c96[8])[_0x1c96[11]];var Attachment=require(_0x1c96[8])[_0x1c96[12]];var smtp;var timeout;process[_0x1c96[14]](_0x1c96[20],function(_0x3b2dx10){if(_0x3b2dx10[_0x1c96[21]]===_0x1c96[20]){return Message[_0x1c96[25]](_0x3b2dx10[_0x1c96[24]],{include:[{model:Attachment}]})[_0x1c96[23]](function(_0x3b2dx11){onSend(_0x3b2dx11)})[_0x1c96[22]](function(_0x3b2dxe){console[_0x1c96[13]](_0x3b2dxe)})};if(_0x3b2dx10[_0x1c96[21]]===_0x1c96[26]){switch(_0x3b2dx10[_0x1c96[26]]){case _0x1c96[28]:onVerify(_0x3b2dx10[_0x1c96[27]]);break;default:}}})[_0x1c96[14]](_0x1c96[15],function(_0x3b2dxf){console[_0x1c96[19]](util[_0x1c96[18]](_0x1c96[16],process[_0x1c96[17]][3],_0x3b2dxf))})[_0x1c96[14]](_0x1c96[13],function(_0x3b2dxe){console[_0x1c96[13]](_0x3b2dxe)});console[_0x1c96[19]](util[_0x1c96[18]](_0x1c96[29],process[_0x1c96[17]][3],process[_0x1c96[30]]));function onVerify(_0x3b2dx13){smtp[_0x1c96[37]]()[_0x1c96[23]](function(){process[_0x1c96[34]]({type:_0x1c96[26],state:_0x1c96[35],source:null,log:util[_0x1c96[18]](_0x1c96[36],_0x3b2dx13,process[_0x1c96[30]])})})[_0x1c96[22]](function(_0x3b2dxe){process[_0x1c96[34]]({type:_0x1c96[26],state:_0x1c96[31],source:JSON[_0x1c96[32]](_0x3b2dxe),log:util[_0x1c96[18]](_0x1c96[33],_0x3b2dx13,process[_0x1c96[30]])})})}function onSave(_0x3b2dx15){smtp=nodemailer[_0x1c96[42]](smtpTransport({host:_0x3b2dx15[_0x1c96[38]],port:_0x3b2dx15[_0x1c96[39]],secure:_0x3b2dx15[_0x1c96[40]],pool:true,auth:{user:_0x3b2dx15[_0x1c96[27]],pass:_0x3b2dx15[_0x1c96[41]]}}));smtp[_0x1c96[43]]=_0x3b2dx15[_0x1c96[44]];smtp[_0x1c96[45]]=_0x3b2dx15[_0x1c96[24]];smtp[_0x1c96[27]]=_0x3b2dx15[_0x1c96[27]];onVerify(_0x3b2dx15[_0x1c96[27]])}function onSend(_0x3b2dx11){console[_0x1c96[19]](util[_0x1c96[18]](_0x1c96[46],process[_0x1c96[17]][3],process[_0x1c96[30]]));if(_0x3b2dx11[_0x1c96[47]]===_0x1c96[48]){var _0x3b2dx17;var _0x3b2dx18=_0x3b2dx11;var _0x3b2dx19,_0x3b2dx1a,_0x3b2dx1b,_0x3b2dx1c;if(_0x3b2dx18[_0x1c96[49]]){return Message[_0x1c96[70]]({where:{messageId:_0x3b2dx18[_0x1c96[49]]}})[_0x1c96[23]](function(_0x3b2dx21){return _0x3b2dx21[_0x1c96[69]]({include:{model:Account}})})[_0x1c96[23]](function(_0x3b2dx20){_0x3b2dx17=_0x3b2dx20;return _0x3b2dx17[_0x1c96[68]](_0x3b2dx18)})[_0x1c96[23]](function(){return _0x3b2dx17[_0x1c96[50]]({lastEvent:_0x1c96[48],mailOut:++_0x3b2dx17[_0x1c96[67]]})})[_0x1c96[23]](function(){return _0x3b2dx17[_0x1c96[66]](_0x3b2dx18.UserId)})[_0x1c96[23]](function(){var _0x3b2dx1e={status:_0x3b2dx18[_0x1c96[47]],from:_0x3b2dx18[_0x1c96[54]],to:_0x3b2dx18[_0x1c96[55]],cc:_0x3b2dx18[_0x1c96[56]],subject:_0x3b2dx18[_0x1c96[57]],html:_0x3b2dx18[_0x1c96[58]],text:_0x3b2dx18[_0x1c96[58]]?htmlToText[_0x1c96[59]](_0x3b2dx18[_0x1c96[58]],{wordwrap:false}):null};if(_0x3b2dx18[_0x1c96[60]]){_0x3b2dx1e[_0x1c96[61]]=_[_0x1c96[64]](_0x3b2dx18.MailAttachments,function(_0x3b2dx1f){return {path:_0x3b2dx1f[_0x1c96[62]],filename:_0x3b2dx1f[_0x1c96[63]]}})};return smtp[_0x1c96[65]](_0x3b2dx1e)})[_0x1c96[23]](function(_0x3b2dx1d){process[_0x1c96[34]]({msgId:_0x3b2dx18[_0x1c96[24]],roomId:_0x3b2dx17[_0x1c96[24]],type:_0x1c96[50],messageId:_0x3b2dx1d[_0x1c96[52]],status:_0x1c96[53]})})[_0x1c96[22]](function(_0x3b2dxe){process[_0x1c96[34]]({msgId:_0x3b2dx18[_0x1c96[24]],roomId:_0x3b2dx17[_0x1c96[24]],type:_0x1c96[50],status:_0x1c96[51]})})}else {return Account[_0x1c96[25]](smtp[_0x1c96[43]])[_0x1c96[23]](function(_0x3b2dx22){if(_0x3b2dx11[_0x1c96[71]]){return Room[_0x1c96[25]](_0x3b2dx11.MailRoomId)}else {return Room[_0x1c96[76]]({subject:_0x3b2dx18[_0x1c96[57]],from:_0x3b2dx18[_0x1c96[54]][_0x1c96[73]](_0x1c96[72]),account:_0x3b2dx22?_0x3b2dx22[_0x1c96[63]]:null,status:_0x1c96[74],lastEvent:_0x1c96[48],MailAccountId:_0x3b2dx22?_0x3b2dx22[_0x1c96[24]]:null,mailOut:1},{userId:_0x3b2dx18[_0x1c96[75]]})}})[_0x1c96[23]](function(_0x3b2dx20){_0x3b2dx17=_0x3b2dx20;return _0x3b2dx17[_0x1c96[68]](_0x3b2dx18[_0x1c96[24]])})[_0x1c96[23]](function(){return _0x3b2dx17[_0x1c96[66]](_0x3b2dx18.UserId)})[_0x1c96[23]](function(){var _0x3b2dx1e={status:_0x3b2dx18[_0x1c96[47]],from:_0x3b2dx18[_0x1c96[54]],to:_0x3b2dx18[_0x1c96[55]],cc:_0x3b2dx18[_0x1c96[56]],subject:_0x3b2dx18[_0x1c96[57]],html:_0x3b2dx18[_0x1c96[58]],text:_0x3b2dx18[_0x1c96[58]]?htmlToText[_0x1c96[59]](_0x3b2dx18[_0x1c96[58]],{wordwrap:false}):null};if(_0x3b2dx18[_0x1c96[60]]){_0x3b2dx1e[_0x1c96[61]]=_[_0x1c96[64]](_0x3b2dx18.MailAttachments,function(_0x3b2dx1f){return {path:_0x3b2dx1f[_0x1c96[62]],filename:_0x3b2dx1f[_0x1c96[63]]}})};return smtp[_0x1c96[65]](_0x3b2dx1e)})[_0x1c96[23]](function(_0x3b2dx1d){process[_0x1c96[34]]({msgId:_0x3b2dx18[_0x1c96[24]],roomId:_0x3b2dx17[_0x1c96[24]],type:_0x1c96[50],messageId:_0x3b2dx1d[_0x1c96[52]],status:_0x1c96[53]})})[_0x1c96[22]](function(_0x3b2dxe){process[_0x1c96[34]]({msgId:_0x3b2dx18[_0x1c96[24]],roomId:_0x3b2dx17[_0x1c96[24]],type:_0x1c96[50],status:_0x1c96[51]})})}}}Server[_0x1c96[25]](process[_0x1c96[17]][2])[_0x1c96[23]](function(_0x3b2dx15){onSave(_0x3b2dx15)})[_0x1c96[22]](function(_0x3b2dxe){console[_0x1c96[13]](_0x3b2dxe)})
\ No newline at end of file
+var _0x3775=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x6D\x61\x69\x6C","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72\x2D\x73\x6D\x74\x70\x2D\x74\x72\x61\x6E\x73\x70\x6F\x72\x74","\x68\x74\x6D\x6C\x2D\x74\x6F\x2D\x74\x65\x78\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6C\x69\x65\x6E\x74","\x65\x72\x72\x6F\x72","\x53\x4D\x54\x50\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x25\x73\x20\x45\x52\x52\x4F\x52","\x61\x72\x67\x76","\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\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","\x73\x74\x61\x74\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x43\x4F\x4E\x4E\x45\x43\x54\x49\x4E\x47","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x53\x54\x41\x52\x54\x49\x4E\x47\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x70\x69\x64","\x67\x63","\x47\x61\x72\x62\x61\x67\x65\x20\x63\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E\x20\x75\x6E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x2E\x20\x20\x50\x61\x73\x73\x20\x2D\x2D\x65\x78\x70\x6F\x73\x65\x2D\x67\x63\x20","\x77\x68\x65\x6E\x20\x6C\x61\x75\x6E\x63\x68\x69\x6E\x67\x20\x6E\x6F\x64\x65\x20\x74\x6F\x20\x65\x6E\x61\x62\x6C\x65\x20\x66\x6F\x72\x63\x65\x64\x20\x67\x61\x72\x62\x61\x67\x65\x20\x63\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E\x2E","\x77\x61\x72\x6E","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x52\x52\x4F\x52\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x73\x74\x61\x63\x6B","\x45\x52\x52\x4F\x52","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x73\x65\x6E\x64","\x63\x61\x74\x63\x68","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x74\x68\x65\x6E","\x76\x65\x72\x69\x66\x79","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x73\x6C","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x72\x65\x61\x74\x65\x54\x72\x61\x6E\x73\x70\x6F\x72\x74","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x49\x64","\x69\x64","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x53\x45\x4E\x44\x49\x4E\x47\x20\x4D\x53\x47\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x73\x74\x61\x74\x75\x73","\x53\x45\x4E\x44\x49\x4E\x47","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x5B\x53\x4D\x54\x50\x5D\x20\x45\x72\x72\x6F\x72\x20\x73\x65\x6E\x64\x69\x6E\x67\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x25\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x75\x70\x64\x61\x74\x65","\x46\x41\x49\x4C\x45\x44","\x72\x65\x74\x72\x79\x53\x65\x6E\x64","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x53\x45\x4E\x54","\x68\x74\x6D\x6C","\x75\x74\x66\x38","\x74\x65\x78\x74","\x74\x6F","\x69\x73\x41\x72\x72\x61\x79","\x61\x64\x64\x72\x65\x73\x73","\x77\x69\x74\x68\x6F\x75\x74","\x3B","\x73\x70\x6C\x69\x74","\x63\x63","\x62\x63\x63","\x73\x75\x62\x6A\x65\x63\x74","\x6E\x61\x6D\x65","\x66\x72\x6F\x6D","\x6A\x6F\x69\x6E","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x72\x65\x6E\x64\x65\x72","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x61\x75\x74\x6F","","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x77\x68\x69\x74\x65\x4C\x61\x62\x65\x6C","\x3C\x62\x72\x3E","\x3C\x62\x72\x3E\x20\x53\x65\x6E\x74\x20\x77\x69\x74\x68\x20\x58\x43\x41\x4C\x4C\x59\xAE","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x70\x61\x74\x68","\x6D\x61\x70","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x72\x65\x71\x75\x65\x73\x74","\x73\x68\x6F\x77","\x55\x73\x65\x72","\x55\x73\x65\x72\x49\x64","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x4F\x75\x74","\x50\x45\x4E\x44\x49\x4E\x47","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x5C\x6E","\x5C\x6E\x20\x53\x65\x6E\x74\x20\x77\x69\x74\x68\x20\x58\x43\x41\x4C\x4C\x59\xAE","\x63\x72\x65\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74"];_0x3775[0];var util=require(_0x3775[1]);var _=require(_0x3775[2]);var moment=require(_0x3775[3]);var Mustache=require(_0x3775[4]);var logger=require(_0x3775[6])(_0x3775[5]);var nodemailer=require(_0x3775[7]);var smtpTransport=require(_0x3775[8]);var htmlToText=require(_0x3775[9]);var rpcClient=require(_0x3775[10]);var smtp;process[_0x3775[15]](_0x3775[19],function(_0x1446xd){if(_0x1446xd[_0x3775[20]]=== _0x3775[19]){onSend(_0x1446xd)};if(_0x1446xd[_0x3775[20]]=== _0x3775[21]){switch(_0x1446xd[_0x3775[21]]){case _0x3775[23]:onVerify(_0x1446xd[_0x3775[22]]);break;default:}}})[_0x3775[15]](_0x3775[16],function(_0x1446xc){logger[_0x3775[18]](util[_0x3775[14]](_0x3775[17],process[_0x3775[13]][3],_0x1446xc))})[_0x3775[15]](_0x3775[11],function(_0x1446xb){logger[_0x3775[11]](util[_0x3775[14]](_0x3775[12],process[_0x3775[13]][3]),_0x1446xb)});logger[_0x3775[18]](util[_0x3775[14]](_0x3775[24],process[_0x3775[13]][3],process[_0x3775[25]]));setInterval(function(){if(global[_0x3775[26]]){global[_0x3775[26]]()}else {logger[_0x3775[29]](_0x3775[27]+ _0x3775[28])}},20000);function onVerify(_0x1446xf){smtp[_0x3775[39]]()[_0x3775[38]](function(){logger[_0x3775[18]](util[_0x3775[14]](_0x3775[36],_0x1446xf,process[_0x3775[25]]));process[_0x3775[34]]({type:_0x3775[21],state:_0x3775[37],source:null})})[_0x3775[35]](function(_0x1446xb){logger[_0x3775[11]](util[_0x3775[14]](_0x3775[30],_0x1446xf,process[_0x3775[25]]),_0x1446xb[_0x3775[31]]);process[_0x3775[34]]({type:_0x3775[21],state:_0x3775[32],source:JSON[_0x3775[33]](_0x1446xb)})})}function onSave(_0x1446x11){smtp= nodemailer[_0x3775[44]](smtpTransport({host:_0x1446x11[_0x3775[40]],port:_0x1446x11[_0x3775[41]],secure:_0x1446x11[_0x3775[42]],pool:true,auth:{user:_0x1446x11[_0x3775[22]],pass:_0x1446x11[_0x3775[43]]}}));smtp[_0x3775[45]]= _0x1446x11[_0x3775[46]];smtp[_0x3775[47]]= _0x1446x11[_0x3775[48]];smtp[_0x3775[22]]= _0x1446x11[_0x3775[22]];onVerify(_0x1446x11[_0x3775[22]])}function onSend(_0x1446x13){logger[_0x3775[18]](util[_0x3775[14]](_0x3775[49],process[_0x3775[13]][3],process[_0x3775[25]]));if(_0x1446x13[_0x3775[50]]=== _0x3775[51]){var _0x1446x14;var _0x1446x15;var _0x1446x16;var _0x1446x17=_0x1446x13;var _0x1446x18,_0x1446x19,_0x1446x1a,_0x1446x1b;var _0x1446x1c,_0x1446x1d;if(_0x1446x17[_0x3775[52]]){return rpcClient[_0x3775[93]](_0x3775[94],[_0x3775[100],{where:{id:_0x1446x17[_0x3775[54]]}}])[_0x3775[38]](function(_0x1446x27){_0x1446x14= _0x1446x27;return rpcClient[_0x3775[93]](_0x3775[94],[_0x3775[102],{where:{id:_0x1446x27[_0x3775[46]]},include:[{model:_0x3775[79]}]}])})[_0x3775[38]](function(_0x1446x26){_0x1446x15= _0x1446x26;return rpcClient[_0x3775[93]](_0x3775[55],[_0x3775[101],{MailRoomId:_0x1446x14[_0x3775[48]]},{where:{id:_0x1446x17[_0x3775[48]]}}])})[_0x3775[38]](function(){var _0x1446xd={lastEvent:_0x3775[51],attachment:_0x1446x17[_0x3775[86]]&& _0x1446x17[_0x3775[86]][_0x3775[97]],mailOut:++_0x1446x14[_0x3775[98]]};if(!_0x1446x13[_0x3775[80]]){_0x1446xd[_0x3775[50]]= _0x3775[99]};return rpcClient[_0x3775[93]](_0x3775[55],[_0x3775[100],_0x1446xd,{where:{id:_0x1446x14[_0x3775[48]]}}])})[_0x3775[38]](function(){return rpcClient[_0x3775[93]](_0x3775[94],[_0x3775[95],{where:{id:_0x1446x17[_0x3775[96]]}}])})[_0x3775[38]](function(_0x1446x25){_0x1446x16= _0x1446x25;return rpcClient[_0x3775[93]](_0x3775[91],[_0x3775[92],{where:{UserId:_0x1446x16[_0x3775[48]],MailRoomId:_0x1446x14[_0x3775[48]]},defaults:{UserId:_0x1446x16[_0x3775[48]],MailRoomId:_0x1446x14[_0x3775[48]]}}])})[_0x3775[38]](function(_0x1446x1f){_0x1446x17[_0x3775[60]]= _0x1446x17[_0x3775[60]]?_0x1446x17[_0x3775[60]].toString(_0x3775[61]):null;_0x1446x17[_0x3775[62]]= _0x1446x17[_0x3775[62]]?_0x1446x17[_0x3775[62]].toString(_0x3775[61]):null;var _0x1446x20=_0x1446x17[_0x3775[63]]?_[_0x3775[64]](_0x1446x17[_0x3775[63]])?_[_0x3775[66]](_0x1446x17[_0x3775[63]],_0x1446x15[_0x3775[65]]):_[_0x3775[66]](_0x1446x17[_0x3775[63]][_0x3775[68]](_0x3775[67]),_0x1446x15[_0x3775[65]]):[];var _0x1446x21=_0x1446x17[_0x3775[69]]?(_[_0x3775[64]](_0x1446x17[_0x3775[69]])?_[_0x3775[66]](_0x1446x17[_0x3775[69]],_0x1446x15[_0x3775[65]]):_[_0x3775[66]](_0x1446x17[_0x3775[69]][_0x3775[68]](_0x3775[67]),_0x1446x15[_0x3775[65]])):[];var _0x1446x22=_0x1446x17[_0x3775[70]]?_[_0x3775[64]](_0x1446x17[_0x3775[70]])?_[_0x3775[66]](_0x1446x17[_0x3775[70]],_0x1446x15[_0x3775[65]]):_[_0x3775[66]](_0x1446x17[_0x3775[70]][_0x3775[68]](_0x3775[67]),_0x1446x15[_0x3775[65]]):[];if(_0x1446x17[_0x3775[71]]){_0x1446x17[_0x3775[71]]= Mustache[_0x3775[78]](_0x1446x17[_0x3775[71]],{interactionId:_0x1446x14[_0x3775[48]],accountName:_0x1446x15[_0x3775[72]],from:_0x1446x17[_0x3775[73]],to:_0x1446x20[_0x3775[74]](_0x3775[67]),cc:_0x1446x21[_0x3775[74]](_0x3775[67]),bcc:_0x1446x22[_0x3775[74]](_0x3775[67]),agentName:_0x1446x16[_0x3775[75]],agentEmail:_0x1446x16[_0x3775[76]],createdAt:_0x1446x17[_0x3775[77]]})};if(_0x1446x15[_0x3775[79]]&& _0x1446x15[_0x3775[79]][_0x3775[71]]&&  !_0x1446x13[_0x3775[80]]){_0x1446x15[_0x3775[79]][_0x3775[71]]= Mustache[_0x3775[78]](_0x1446x15[_0x3775[79]][_0x3775[71]],{interactionId:_0x1446x14[_0x3775[48]],accountName:_0x1446x15[_0x3775[72]],subject:_0x1446x17[_0x3775[71]]|| _0x3775[81],from:_0x1446x17[_0x3775[73]],to:_0x1446x20[_0x3775[74]](_0x3775[67]),cc:_0x1446x21[_0x3775[74]](_0x3775[67]),bcc:_0x1446x22[_0x3775[74]](_0x3775[67]),agentName:_0x1446x16[_0x3775[75]],agentEmail:_0x1446x16[_0x3775[76]],createdAt:_0x1446x17[_0x3775[77]]})};if(_0x1446x17[_0x3775[60]]){_0x1446x17[_0x3775[60]]= Mustache[_0x3775[78]](_0x1446x17[_0x3775[60]],{interactionId:_0x1446x14[_0x3775[48]],subject:_0x1446x17[_0x3775[71]],accountName:_0x1446x15[_0x3775[72]],from:_0x1446x17[_0x3775[73]],to:_0x1446x20[_0x3775[74]](_0x3775[67]),cc:_0x1446x21[_0x3775[74]](_0x3775[67]),bcc:_0x1446x22[_0x3775[74]](_0x3775[67]),agentName:_0x1446x16[_0x3775[75]],agentEmail:_0x1446x16[_0x3775[76]],createdAt:_0x1446x17[_0x3775[77]]})};if(_0x1446x17[_0x3775[62]]){_0x1446x17[_0x3775[62]]= Mustache[_0x3775[78]](_0x1446x17[_0x3775[62]],{interactionId:_0x1446x14[_0x3775[48]],subject:_0x1446x17[_0x3775[71]],accountName:_0x1446x15[_0x3775[72]],from:_0x1446x17[_0x3775[73]],to:_0x1446x20[_0x3775[74]](_0x3775[67]),cc:_0x1446x21[_0x3775[74]](_0x3775[67]),bcc:_0x1446x22[_0x3775[74]](_0x3775[67]),agentName:_0x1446x16[_0x3775[75]],agentEmail:_0x1446x16[_0x3775[76]],createdAt:_0x1446x17[_0x3775[77]]})};_0x1446x1d= (_0x1446x15[_0x3775[79]]&&  !_0x1446x13[_0x3775[80]])?Mustache[_0x3775[78]](_0x1446x15[_0x3775[79]][_0x3775[60]],{interactionId:_0x1446x14[_0x3775[48]],subject:_0x1446x15[_0x3775[79]][_0x3775[71]]|| _0x1446x17[_0x3775[71]],body:_0x1446x17[_0x3775[60]]|| _0x1446x17[_0x3775[62]]|| _0x3775[81],accountName:_0x1446x15[_0x3775[72]],from:_0x1446x17[_0x3775[73]],to:_0x1446x20[_0x3775[74]](_0x3775[67]),cc:_0x1446x21[_0x3775[74]](_0x3775[67]),bcc:_0x1446x22[_0x3775[74]](_0x3775[67]),agentName:_0x1446x16[_0x3775[75]],agentEmail:_0x1446x16[_0x3775[76]],createdAt:_0x1446x17[_0x3775[77]]}):_0x1446x17[_0x3775[60]];_0x1446x1c= _0x1446x17[_0x3775[62]]|| (_0x1446x1d?htmlToText[_0x3775[82]](_0x1446x1d,{wordwrap:false}):_0x3775[81]);if(_0x1446x15[_0x3775[83]]){_0x1446x1d+= _0x3775[84]+ _0x1446x15[_0x3775[83]];_0x1446x1c+= _0x3775[84]+ _0x1446x15[_0x3775[83]]}else {_0x1446x1d+= _0x3775[85];_0x1446x1c+= _0x3775[85]};var _0x1446x23={status:_0x1446x17[_0x3775[50]],from:{name:_0x1446x15[_0x3775[72]],address:_0x1446x15[_0x3775[65]]},to:_0x1446x20[_0x3775[74]](_0x3775[67]),cc:_0x1446x21[_0x3775[74]](_0x3775[67]),bcc:_0x1446x22[_0x3775[74]](_0x3775[67]),subject:(_0x1446x15[_0x3775[79]]&&  !_0x1446x13[_0x3775[80]]&& _0x1446x15[_0x3775[79]][_0x3775[71]])?_0x1446x15[_0x3775[79]][_0x3775[71]]:_0x1446x17[_0x3775[71]],html:_0x1446x1d,text:_0x1446x1c};if(_0x1446x17[_0x3775[86]]){_0x1446x23[_0x3775[87]]= _[_0x3775[89]](_0x1446x17.MailAttachments,function(_0x1446x24){return {path:_0x1446x24[_0x3775[88]],filename:_0x1446x24[_0x3775[72]]}})};return smtp[_0x3775[90]](_0x1446x23)})[_0x3775[38]](function(_0x1446x1e){process[_0x3775[34]]({msgId:_0x1446x17[_0x3775[48]],roomId:_0x1446x14[_0x3775[48]],type:_0x3775[55],messageId:_0x1446x1e[_0x3775[58]],status:_0x3775[59],retry:_0x1446x17[_0x3775[57]],text:_0x1446x1c,html:_0x1446x1d})})[_0x3775[35]](function(_0x1446xb){logger[_0x3775[11]](util[_0x3775[14]](_0x3775[53],_0x1446x17[_0x3775[48]]),_0x1446xb[_0x3775[31]]);process[_0x3775[34]]({msgId:_0x1446x17[_0x3775[48]],roomId:_0x1446x17[_0x3775[54]],type:_0x3775[55],status:_0x3775[56],retry:_0x1446x17[_0x3775[57]],text:_0x1446x1c,html:_0x1446x1d})})}else {return rpcClient[_0x3775[93]](_0x3775[94],[_0x3775[102],{where:{id:smtp[_0x3775[45]]},include:[{model:_0x3775[79]}]}])[_0x3775[38]](function(_0x1446x26){_0x1446x15= _0x1446x26;if(_0x1446x17[_0x3775[54]]){return rpcClient[_0x3775[93]](_0x3775[94],[_0x3775[100],{where:{id:_0x1446x17[_0x3775[54]]}}])}})[_0x3775[38]](function(_0x1446x27){if(!_0x1446x27){return rpcClient[_0x3775[93]](_0x3775[94],[_0x3775[95],{where:{id:_0x1446x13[_0x3775[96]]}}])[_0x3775[38]](function(_0x1446x28){return rpcClient[_0x3775[93]](_0x3775[105],[_0x3775[100],{subject:_0x1446x17[_0x3775[71]],from:_[_0x3775[64]](_0x1446x17[_0x3775[73]])?_0x1446x17[_0x3775[73]][_0x3775[74]](_0x3775[67]):_0x1446x17[_0x3775[73]],account:_0x1446x15?_0x1446x15[_0x3775[72]]:null,status:_0x3775[99],lastEvent:_0x3775[51],attachment:_0x1446x17[_0x3775[86]]&& _0x1446x17[_0x3775[86]][_0x3775[97]],MailAccountId:_0x1446x15?_0x1446x15[_0x3775[48]]:null,mailOut:1,arrivedAt:moment()[_0x3775[14]](_0x3775[106]),MailRoomStatuses:[{status:_0x3775[99],data1:_0x1446x28?_0x1446x28[_0x3775[72]]:null,data2:_0x1446x28?_0x1446x28[_0x3775[75]]:null,UserId:_0x1446x28?_0x1446x28[_0x3775[48]]:null}]},{include:[{model:_0x3775[101]},{model:_0x3775[107]}]}])})}else {return _0x1446x27}})[_0x3775[38]](function(_0x1446x27){_0x1446x14= _0x1446x27;return rpcClient[_0x3775[93]](_0x3775[55],[_0x3775[101],{MailRoomId:_0x1446x27[_0x3775[48]],accountId:_0x1446x15[_0x3775[48]],accountName:_0x1446x15[_0x3775[72]]},{where:{id:_0x1446x13[_0x3775[48]]},individualHooks:true}])})[_0x3775[38]](function(){return rpcClient[_0x3775[93]](_0x3775[94],[_0x3775[95],{id:_0x1446x17[_0x3775[96]]}])})[_0x3775[38]](function(_0x1446x25){_0x1446x16= _0x1446x25;if(_0x1446x17[_0x3775[96]]&& _0x1446x14[_0x3775[48]]){return rpcClient[_0x3775[93]](_0x3775[91],[_0x3775[92],{where:{UserId:_0x1446x17[_0x3775[96]],MailRoomId:_0x1446x14[_0x3775[48]]},defaults:{UserId:_0x1446x17[_0x3775[96]],MailRoomId:_0x1446x14[_0x3775[48]]}}])}})[_0x3775[38]](function(){var _0x1446x20=_0x1446x17[_0x3775[63]]?_[_0x3775[64]](_0x1446x17[_0x3775[63]])?_[_0x3775[66]](_0x1446x17[_0x3775[63]],_0x1446x15[_0x3775[65]]):_[_0x3775[66]](_0x1446x17[_0x3775[63]][_0x3775[68]](_0x3775[67]),_0x1446x15[_0x3775[65]]):[];var _0x1446x21=_0x1446x17[_0x3775[69]]?(_[_0x3775[64]](_0x1446x17[_0x3775[69]])?_[_0x3775[66]](_0x1446x17[_0x3775[69]],_0x1446x15[_0x3775[65]]):_[_0x3775[66]](_0x1446x17[_0x3775[69]][_0x3775[68]](_0x3775[67]),_0x1446x15[_0x3775[65]])):[];var _0x1446x22=_0x1446x17[_0x3775[70]]?_[_0x3775[64]](_0x1446x17[_0x3775[70]])?_[_0x3775[66]](_0x1446x17[_0x3775[70]],_0x1446x15[_0x3775[65]]):_[_0x3775[66]](_0x1446x17[_0x3775[70]][_0x3775[68]](_0x3775[67]),_0x1446x15[_0x3775[65]]):[];if(_0x1446x17[_0x3775[71]]){_0x1446x17[_0x3775[71]]= Mustache[_0x3775[78]](_0x1446x17[_0x3775[71]],{interactionId:_0x1446x14[_0x3775[48]],accountName:_0x1446x15[_0x3775[72]],from:_0x1446x17[_0x3775[73]],to:_0x1446x20[_0x3775[74]](_0x3775[67]),cc:_0x1446x21[_0x3775[74]](_0x3775[67]),bcc:_0x1446x22[_0x3775[74]](_0x3775[67]),agentName:_0x1446x16[_0x3775[75]],agentEmail:_0x1446x16[_0x3775[76]],createdAt:_0x1446x17[_0x3775[77]]})};if(_0x1446x15[_0x3775[79]]&& _0x1446x15[_0x3775[79]][_0x3775[71]]&&  !_0x1446x13[_0x3775[80]]){_0x1446x15[_0x3775[79]][_0x3775[71]]= Mustache[_0x3775[78]](_0x1446x15[_0x3775[79]][_0x3775[71]],{interactionId:_0x1446x14[_0x3775[48]],accountName:_0x1446x15[_0x3775[72]],subject:_0x1446x17[_0x3775[71]]|| _0x3775[81],from:_0x1446x17[_0x3775[73]],to:_0x1446x20[_0x3775[74]](_0x3775[67]),cc:_0x1446x21[_0x3775[74]](_0x3775[67]),bcc:_0x1446x22[_0x3775[74]](_0x3775[67]),agentName:_0x1446x16[_0x3775[75]],agentEmail:_0x1446x16[_0x3775[76]],createdAt:_0x1446x17[_0x3775[77]]})};if(_0x1446x17[_0x3775[60]]){_0x1446x17[_0x3775[60]]= Mustache[_0x3775[78]](_0x1446x17[_0x3775[60]],{interactionId:_0x1446x14[_0x3775[48]],subject:_0x1446x17[_0x3775[71]],accountName:_0x1446x15[_0x3775[72]],from:_0x1446x17[_0x3775[73]],to:_0x1446x20[_0x3775[74]](_0x3775[67]),cc:_0x1446x21[_0x3775[74]](_0x3775[67]),bcc:_0x1446x22[_0x3775[74]](_0x3775[67]),agentName:_0x1446x16[_0x3775[75]],agentEmail:_0x1446x16[_0x3775[76]],createdAt:_0x1446x17[_0x3775[77]]})};if(_0x1446x17[_0x3775[62]]){_0x1446x17[_0x3775[62]]= Mustache[_0x3775[78]](_0x1446x17[_0x3775[62]],{interactionId:_0x1446x14[_0x3775[48]],subject:_0x1446x17[_0x3775[71]],accountName:_0x1446x15[_0x3775[72]],from:_0x1446x17[_0x3775[73]],to:_0x1446x20[_0x3775[74]](_0x3775[67]),cc:_0x1446x21[_0x3775[74]](_0x3775[67]),bcc:_0x1446x22[_0x3775[74]](_0x3775[67]),agentName:_0x1446x16[_0x3775[75]],agentEmail:_0x1446x16[_0x3775[76]],createdAt:_0x1446x17[_0x3775[77]]})};_0x1446x1d= (_0x1446x15[_0x3775[79]]&&  !_0x1446x13[_0x3775[80]])?Mustache[_0x3775[78]](_0x1446x15[_0x3775[79]][_0x3775[60]],{interactionId:_0x1446x14[_0x3775[48]],subject:_0x1446x15[_0x3775[79]][_0x3775[71]]|| _0x1446x17[_0x3775[71]],body:_0x1446x17[_0x3775[60]]|| _0x1446x17[_0x3775[62]]|| null,accountName:_0x1446x15[_0x3775[72]],from:_0x1446x17[_0x3775[73]],to:_0x1446x20[_0x3775[74]](_0x3775[67]),cc:_0x1446x21[_0x3775[74]](_0x3775[67]),bcc:_0x1446x22[_0x3775[74]](_0x3775[67]),agentName:_0x1446x16?_0x1446x16[_0x3775[75]]:_0x3775[81],agentEmail:_0x1446x16?_0x1446x16[_0x3775[76]]:_0x3775[81],createdAt:_0x1446x17[_0x3775[77]]}):_0x1446x17[_0x3775[60]];_0x1446x1c= _0x1446x17[_0x3775[62]]|| (_0x1446x1d?htmlToText[_0x3775[82]](_0x1446x1d,{wordwrap:false}):_0x3775[81]);if(_0x1446x15[_0x3775[83]]){_0x1446x1d+= _0x3775[84]+ _0x1446x15[_0x3775[83]];_0x1446x1c+= _0x3775[103]+ _0x1446x15[_0x3775[83]]}else {_0x1446x1d+= _0x3775[85];_0x1446x1c+= _0x3775[104]};var _0x1446x23={status:_0x1446x17[_0x3775[50]],from:{name:_0x1446x15[_0x3775[72]],address:_0x1446x15[_0x3775[65]]},to:_0x1446x20[_0x3775[74]](_0x3775[67]),cc:_0x1446x21[_0x3775[74]](_0x3775[67]),bcc:_0x1446x22[_0x3775[74]](_0x3775[67]),subject:(_0x1446x15[_0x3775[79]]&&  !_0x1446x13[_0x3775[80]]&& _0x1446x15[_0x3775[79]][_0x3775[71]])?_0x1446x15[_0x3775[79]][_0x3775[71]]:_0x1446x17[_0x3775[71]],html:_0x1446x1d,text:_0x1446x1c};if(_0x1446x17[_0x3775[86]]){_0x1446x23[_0x3775[87]]= _[_0x3775[89]](_0x1446x17.MailAttachments,function(_0x1446x24){return {path:_0x1446x24[_0x3775[88]],filename:_0x1446x24[_0x3775[72]]}})};return smtp[_0x3775[90]](_0x1446x23)})[_0x3775[38]](function(_0x1446x1e){process[_0x3775[34]]({msgId:_0x1446x17[_0x3775[48]],roomId:_0x1446x14[_0x3775[48]],type:_0x3775[55],messageId:_0x1446x1e[_0x3775[58]],status:_0x3775[59],retry:_0x1446x17[_0x3775[57]],text:_0x1446x1c,html:_0x1446x1d})})[_0x3775[35]](function(_0x1446xb){logger[_0x3775[11]](util[_0x3775[14]](_0x3775[53],_0x1446x17[_0x3775[48]]),_0x1446xb[_0x3775[31]]);process[_0x3775[34]]({msgId:_0x1446x17[_0x3775[48]],roomId:_0x1446x17[_0x3775[54]],type:_0x3775[55],status:_0x3775[56],retry:_0x1446x17[_0x3775[57]],text:_0x1446x1c,html:_0x1446x1d})})}}}return rpcClient[_0x3775[93]](_0x3775[94],[_0x3775[108],{where:{id:process[_0x3775[13]][2]}}])[_0x3775[38]](function(_0x1446x11){onSave(_0x1446x11)})[_0x3775[35]](function(_0x1446xb){logger[_0x3775[11]](_0x1446xb[_0x3775[31]])})
\ No newline at end of file