Built motion from commit 78ef1e9a0.|1.0.36
[motion.git] / server / config / smtp / smtp.js
index af3a58a..5971f32 100644 (file)
@@ -1 +1 @@
-var _0x5f56=["\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","\x6D\x75\x73\x74\x61\x63\x68\x65","\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","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x54\x65\x6D\x70\x6C\x61\x74\x65","\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","\x72\x65\x74\x72\x79\x53\x65\x6E\x64","\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","\x68\x74\x6D\x6C","\x73\x75\x62\x6A\x65\x63\x74","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x6E\x61\x6D\x65","\x66\x72\x6F\x6D","\x74\x6F","\x63\x63","\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","\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","\x61\x64\x64\x55\x73\x65\x72","\x6C\x65\x6E\x67\x74\x68","\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"];_0x5f56[0];var util=require(_0x5f56[1]);var promise=require(_0x5f56[2]);var _=require(_0x5f56[3]);var Mustache=require(_0x5f56[4]);var nodemailer=require(_0x5f56[5]);var smtpTransport=require(_0x5f56[6]);var htmlToText=require(_0x5f56[7]);var Agent=require(_0x5f56[9])[_0x5f56[8]];var Room=require(_0x5f56[9])[_0x5f56[10]];var Template=require(_0x5f56[9])[_0x5f56[11]];var Account=require(_0x5f56[9])[_0x5f56[12]];var Message=require(_0x5f56[9])[_0x5f56[13]];var Message=require(_0x5f56[9])[_0x5f56[13]];var Server=require(_0x5f56[9])[_0x5f56[14]];var Attachment=require(_0x5f56[9])[_0x5f56[15]];var smtp;var timeout;process[_0x5f56[17]](_0x5f56[23],function(_0xbf22x13){if(_0xbf22x13[_0x5f56[24]]===_0x5f56[23]){return Message[_0x5f56[29]](_0xbf22x13[_0x5f56[28]],{include:[{model:Attachment}]})[_0x5f56[27]](function(_0xbf22x14){onSend(_0xbf22x14,_0xbf22x13[_0x5f56[26]])})[_0x5f56[25]](function(_0xbf22x11){console[_0x5f56[16]](_0xbf22x11)})};if(_0xbf22x13[_0x5f56[24]]===_0x5f56[30]){switch(_0xbf22x13[_0x5f56[30]]){case _0x5f56[32]:onVerify(_0xbf22x13[_0x5f56[31]]);break;default:}}})[_0x5f56[17]](_0x5f56[18],function(_0xbf22x12){console[_0x5f56[22]](util[_0x5f56[21]](_0x5f56[19],process[_0x5f56[20]][3],_0xbf22x12))})[_0x5f56[17]](_0x5f56[16],function(_0xbf22x11){console[_0x5f56[16]](_0xbf22x11)});console[_0x5f56[22]](util[_0x5f56[21]](_0x5f56[33],process[_0x5f56[20]][3],process[_0x5f56[34]]));function onVerify(_0xbf22x16){smtp[_0x5f56[41]]()[_0x5f56[27]](function(){process[_0x5f56[38]]({type:_0x5f56[30],state:_0x5f56[39],source:null,log:util[_0x5f56[21]](_0x5f56[40],_0xbf22x16,process[_0x5f56[34]])})})[_0x5f56[25]](function(_0xbf22x11){process[_0x5f56[38]]({type:_0x5f56[30],state:_0x5f56[35],source:JSON[_0x5f56[36]](_0xbf22x11),log:util[_0x5f56[21]](_0x5f56[37],_0xbf22x16,process[_0x5f56[34]])})})}function onSave(_0xbf22x18){smtp=nodemailer[_0x5f56[46]](smtpTransport({host:_0xbf22x18[_0x5f56[42]],port:_0xbf22x18[_0x5f56[43]],secure:_0xbf22x18[_0x5f56[44]],pool:true,auth:{user:_0xbf22x18[_0x5f56[31]],pass:_0xbf22x18[_0x5f56[45]]}}));smtp[_0x5f56[47]]=_0xbf22x18[_0x5f56[48]];smtp[_0x5f56[49]]=_0xbf22x18[_0x5f56[28]];smtp[_0x5f56[31]]=_0xbf22x18[_0x5f56[31]];onVerify(_0xbf22x18[_0x5f56[31]])}function onSend(_0xbf22x14,_0xbf22x1a){console[_0x5f56[22]](util[_0x5f56[21]](_0x5f56[50],process[_0x5f56[20]][3],process[_0x5f56[34]]));if(_0xbf22x14[_0x5f56[51]]===_0x5f56[52]){var _0xbf22x1b;var _0xbf22x1c;var _0xbf22x1d;var _0xbf22x1e=_0xbf22x14;var _0xbf22x1f,_0xbf22x20,_0xbf22x21,_0xbf22x22;if(_0xbf22x1e[_0x5f56[53]]){return Message[_0x5f56[79]]({where:{messageId:_0xbf22x1e[_0x5f56[53]]}})[_0x5f56[27]](function(_0xbf22x29){return _0xbf22x29[_0x5f56[78]]({include:{model:Account,include:[{model:Template}]}})})[_0x5f56[27]](function(_0xbf22x28){_0xbf22x1b=_0xbf22x28;_0xbf22x1c=_0xbf22x28[_0x5f56[12]];return _0xbf22x1b[_0x5f56[77]](_0xbf22x1e)})[_0x5f56[27]](function(){return _0xbf22x1b[_0x5f56[54]]({lastEvent:_0x5f56[52],attachment:_0xbf22x1e[_0x5f56[69]]&&_0xbf22x1e[_0x5f56[69]][_0x5f56[75]],mailOut:++_0xbf22x1b[_0x5f56[76]]})})[_0x5f56[27]](function(){return Agent[_0x5f56[29]](_0xbf22x1e.UserId)})[_0x5f56[27]](function(_0xbf22x27){_0xbf22x1d=_0xbf22x27;return _0xbf22x1b[_0x5f56[74]](_0xbf22x1d)})[_0x5f56[27]](function(){var _0xbf22x24=_0xbf22x1c[_0x5f56[11]]?Mustache[_0x5f56[68]](_0xbf22x1c[_0x5f56[11]][_0x5f56[58]],{interactionId:_0xbf22x1b[_0x5f56[28]],subject:_0xbf22x1e[_0x5f56[59]],body:_0xbf22x1e[_0x5f56[58]]?htmlToText[_0x5f56[60]](_0xbf22x1e[_0x5f56[58]],{wordwrap:false}):null,accountName:_0xbf22x1c[_0x5f56[61]],from:_0xbf22x1e[_0x5f56[62]],to:_0xbf22x1e[_0x5f56[63]],cc:_0xbf22x1e[_0x5f56[64]],agentName:_0xbf22x1d[_0x5f56[65]],agentEmail:_0xbf22x1d[_0x5f56[66]],createdAt:_0xbf22x1e[_0x5f56[67]]}):_0xbf22x1e[_0x5f56[58]];var _0xbf22x25={status:_0xbf22x1e[_0x5f56[51]],from:_0xbf22x1e[_0x5f56[62]],to:_0xbf22x1e[_0x5f56[63]],cc:_0xbf22x1e[_0x5f56[64]],subject:_0xbf22x1e[_0x5f56[59]],html:_0xbf22x24,text:_0xbf22x1e[_0x5f56[58]]?htmlToText[_0x5f56[60]](_0xbf22x1e[_0x5f56[58]],{wordwrap:false}):null};if(_0xbf22x1e[_0x5f56[69]]){_0xbf22x25[_0x5f56[70]]=_[_0x5f56[72]](_0xbf22x1e.MailAttachments,function(_0xbf22x26){return {path:_0xbf22x26[_0x5f56[71]],filename:_0xbf22x26[_0x5f56[61]]}})};return smtp[_0x5f56[73]](_0xbf22x25)})[_0x5f56[27]](function(_0xbf22x23){process[_0x5f56[38]]({msgId:_0xbf22x1e[_0x5f56[28]],roomId:_0xbf22x1b[_0x5f56[28]],type:_0x5f56[54],messageId:_0xbf22x23[_0x5f56[56]],status:_0x5f56[57],retry:_0xbf22x1a})})[_0x5f56[25]](function(_0xbf22x11){process[_0x5f56[38]]({msgId:_0xbf22x1e[_0x5f56[28]],roomId:_0xbf22x1b[_0x5f56[28]],type:_0x5f56[54],status:_0x5f56[55],retry:_0xbf22x1a})})}else {return Account[_0x5f56[29]](smtp[_0x5f56[47]],{include:[{model:Template}]})[_0x5f56[27]](function(_0xbf22x2a){_0xbf22x1c=_0xbf22x2a;if(_0xbf22x14[_0x5f56[80]]){return Room[_0x5f56[29]](_0xbf22x14.MailRoomId)}else {return Room[_0x5f56[85]]({subject:_0xbf22x1e[_0x5f56[59]],from:_0xbf22x1e[_0x5f56[62]][_0x5f56[82]](_0x5f56[81]),account:_0xbf22x2a?_0xbf22x2a[_0x5f56[61]]:null,status:_0x5f56[83],lastEvent:_0x5f56[52],attachment:_0xbf22x1e[_0x5f56[69]]&&_0xbf22x1e[_0x5f56[69]][_0x5f56[75]],MailAccountId:_0xbf22x2a?_0xbf22x2a[_0x5f56[28]]:null,mailOut:1},{userId:_0xbf22x1e[_0x5f56[84]]})}})[_0x5f56[27]](function(_0xbf22x28){_0xbf22x1b=_0xbf22x28;return _0xbf22x1b[_0x5f56[77]](_0xbf22x1e[_0x5f56[28]])})[_0x5f56[27]](function(){return Agent[_0x5f56[29]](_0xbf22x1e.UserId)})[_0x5f56[27]](function(_0xbf22x27){_0xbf22x1d=_0xbf22x27;return _0xbf22x1b[_0x5f56[74]](_0xbf22x1d)})[_0x5f56[27]](function(){var _0xbf22x24=_0xbf22x1c[_0x5f56[11]]?Mustache[_0x5f56[68]](_0xbf22x1c[_0x5f56[11]][_0x5f56[58]],{interactionId:_0xbf22x1b[_0x5f56[28]],subject:_0xbf22x1e[_0x5f56[59]],body:_0xbf22x1e[_0x5f56[58]]?htmlToText[_0x5f56[60]](_0xbf22x1e[_0x5f56[58]],{wordwrap:false}):null,accountName:_0xbf22x1c[_0x5f56[61]],from:_0xbf22x1e[_0x5f56[62]],to:_0xbf22x1e[_0x5f56[63]],cc:_0xbf22x1e[_0x5f56[64]],agentName:_0xbf22x1d[_0x5f56[65]],agentEmail:_0xbf22x1d[_0x5f56[66]],createdAt:_0xbf22x1e[_0x5f56[67]]}):_0xbf22x1e[_0x5f56[58]];var _0xbf22x25={status:_0xbf22x1e[_0x5f56[51]],from:_0xbf22x1e[_0x5f56[62]],to:_0xbf22x1e[_0x5f56[63]],cc:_0xbf22x1e[_0x5f56[64]],subject:_0xbf22x1e[_0x5f56[59]],html:_0xbf22x24,text:_0xbf22x1e[_0x5f56[58]]?htmlToText[_0x5f56[60]](_0xbf22x1e[_0x5f56[58]],{wordwrap:false}):null};if(_0xbf22x1e[_0x5f56[69]]){_0xbf22x25[_0x5f56[70]]=_[_0x5f56[72]](_0xbf22x1e.MailAttachments,function(_0xbf22x26){return {path:_0xbf22x26[_0x5f56[71]],filename:_0xbf22x26[_0x5f56[61]]}})};return smtp[_0x5f56[73]](_0xbf22x25)})[_0x5f56[27]](function(_0xbf22x23){process[_0x5f56[38]]({msgId:_0xbf22x1e[_0x5f56[28]],roomId:_0xbf22x1b[_0x5f56[28]],type:_0x5f56[54],messageId:_0xbf22x23[_0x5f56[56]],status:_0x5f56[57],retry:_0xbf22x1a})})[_0x5f56[25]](function(_0xbf22x11){process[_0x5f56[38]]({msgId:_0xbf22x1e[_0x5f56[28]],roomId:_0xbf22x1b[_0x5f56[28]],type:_0x5f56[54],status:_0x5f56[55],retry:_0xbf22x1a})})}}}Server[_0x5f56[29]](process[_0x5f56[20]][2])[_0x5f56[27]](function(_0xbf22x18){onSave(_0xbf22x18)})[_0x5f56[25]](function(_0xbf22x11){console[_0x5f56[16]](_0xbf22x11)})
\ 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