Built motion from commit 57474b6.|0.0.99
[motion.git] / server / config / smtp / smtp.js
index 4cb7dab..6fca4ef 100644 (file)
@@ -1 +1 @@
-var _0xec80=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\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","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x41\x49\x4C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x20\x53\x4D\x54\x50\x20\x43\x52\x45\x41\x54\x45","\x6C\x6F\x67","\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","\x75\x73\x65\x72","\x61\x75\x74\x68","\x6F\x70\x74\x69\x6F\x6E\x73","\x74\x72\x61\x6E\x73\x70\x6F\x72\x74\x65\x72","\x20\x53\x4D\x54\x50\x20\x55\x50\x44\x41\x54\x45","\x5B\x4D\x41\x49\x4C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x20\x53\x4D\x54\x50\x20\x44\x45\x53\x54\x52\x4F\x59","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x53\x45\x4E\x44\x49\x4E\x47","\x66\x72\x6F\x6D","\x6F\x6E\x53\x65\x6E\x64","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x53\x45\x4E\x54","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x74\x6F","\x63\x63","\x73\x75\x62\x6A\x65\x63\x74","\x68\x74\x6D\x6C","\x74\x65\x78\x74","\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","\x73\x65\x74\x42\x63\x63","\x73\x65\x74\x43\x63","\x73\x65\x74\x54\x6F","\x73\x65\x74\x46\x72\x6F\x6D","\x61\x6C\x6C","\x62\x63\x63","\x3B","\x73\x70\x6C\x69\x74","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x73\x70\x72\x65\x61\x64","\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","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x4F\x50\x45\x4E","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65"];_0xec80[0];var _=require(_0xec80[1]);var Promise=require(_0xec80[2]);var nodemailer=require(_0xec80[3]);var smtpTransport=require(_0xec80[4]);var Contact=require(_0xec80[6])[_0xec80[5]];var MailRoom=require(_0xec80[6])[_0xec80[7]];var MailMessage=require(_0xec80[6])[_0xec80[8]];var ContactEmail=require(_0xec80[6])[_0xec80[9]];var MailServerOut=require(_0xec80[6])[_0xec80[10]];module[_0xec80[11]]={create:function(_0x39ffxa){var _0x39ffxb;var _0x39ffxc;function _0x39ffxd(_0x39ffxa){console[_0xec80[15]](_0xec80[12]+_0x39ffxa[_0xec80[13]]+_0xec80[14]);_0x39ffxc=_0x39ffxa;_0x39ffxb=nodemailer[_0xec80[20]](smtpTransport({host:_0x39ffxa[_0xec80[16]],port:_0x39ffxa[_0xec80[17]],secure:_0x39ffxa[_0xec80[18]],debug:true,auth:{user:_0x39ffxa[_0xec80[13]],pass:_0x39ffxa[_0xec80[19]]}}));}function _0x39ffxe(_0x39ffxa){if(_0x39ffxb[_0xec80[24]][_0xec80[23]][_0xec80[22]][_0xec80[21]]===_0x39ffxa[_0xec80[13]]){console[_0xec80[15]](_0xec80[12]+_0x39ffxa[_0xec80[13]]+_0xec80[25]);_0x39ffxb=null;_0x39ffxb=nodemailer[_0xec80[20]](smtpTransport({host:_0x39ffxa[_0xec80[16]],port:_0x39ffxa[_0xec80[17]],secure:_0x39ffxa[_0xec80[18]],debug:true,auth:{user:_0x39ffxa[_0xec80[13]],pass:_0x39ffxa[_0xec80[19]]}}));}}function _0x39ffxf(_0x39ffxa){if(_0x39ffxb[_0xec80[24]][_0xec80[23]][_0xec80[22]][_0xec80[21]]===_0x39ffxa[_0xec80[13]]){console[_0xec80[15]](_0xec80[26]+_0x39ffxa[_0xec80[13]]+_0xec80[27]);_0x39ffxb=null;}}function _0x39ffx10(_0x39ffx11,_0x39ffx12){if(_0x39ffx11[_0xec80[29]](_0xec80[28])&&_0x39ffx11[_0xec80[28]]===_0xec80[30]&&_0x39ffxb[_0xec80[24]][_0xec80[23]][_0xec80[22]][_0xec80[21]]===_0x39ffx11[_0xec80[31]]){console[_0xec80[15]](_0xec80[32],_0x39ffx11[_0xec80[31]]);var _0x39ffx13;var _0x39ffx14=_0x39ffx11;var _0x39ffx15,_0x39ffx16,_0x39ffx17,_0x39ffx18;if(_0x39ffx14[_0xec80[33]]){return MailMessage[_0xec80[64]]({where:{messageId:_0x39ffx14[_0xec80[33]]}})[_0xec80[38]](function(_0x39ffx27){return _0x39ffx27[_0xec80[63]]()})[_0xec80[38]](function(_0x39ffx26){_0x39ffx13=_0x39ffx26;return _0x39ffx26[_0xec80[62]](_0x39ffx14,{transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null});})[_0xec80[38]](function(){return ContactEmail[_0xec80[58]]({where:{email:_0x39ffx14[_0xec80[31]]},defaults:{email:_0x39ffx14[_0xec80[31]]},transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null})})[_0xec80[61]](function(_0x39ffx23,_0x39ffx24){var _0x39ffx1e=[];var _0x39ffx25=_0x39ffx14[_0xec80[39]]?_0x39ffx14[_0xec80[39]][_0xec80[57]](_0xec80[56]):[];_0x39ffx15=_0x39ffx23;_0x39ffx25[_0xec80[60]](function(_0x39ffx20){_0x39ffx1e[_0xec80[59]](ContactEmail[_0xec80[58]]({where:{email:_0x39ffx20},defaults:{email:_0x39ffx20},transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null}))});return _0x39ffx1e;})[_0xec80[54]]()[_0xec80[38]](function(_0x39ffx21){var _0x39ffx1e=[];var _0x39ffx22=_0x39ffx14[_0xec80[40]]?_0x39ffx14[_0xec80[40]][_0xec80[57]](_0xec80[56]):[];_0x39ffx16=_[_0xec80[48]](_0x39ffx21,function(_0x39ffx1b){return _0x39ffx1b[0]});_0x39ffx22[_0xec80[60]](function(_0x39ffx20){_0x39ffx1e[_0xec80[59]](ContactEmail[_0xec80[58]]({where:{email:_0x39ffx20},defaults:{email:_0x39ffx20},transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null}))});return _0x39ffx1e;})[_0xec80[54]]()[_0xec80[38]](function(_0x39ffx1d){var _0x39ffx1e=[];var _0x39ffx1f=_0x39ffx14[_0xec80[55]]?_0x39ffx14[_0xec80[55]][_0xec80[57]](_0xec80[56]):[];_0x39ffx17=_[_0xec80[48]](_0x39ffx1d,function(_0x39ffx1b){return _0x39ffx1b[0]});_0x39ffx1f[_0xec80[60]](function(_0x39ffx20){_0x39ffx1e[_0xec80[59]](ContactEmail[_0xec80[58]]({where:{email:_0x39ffx20},defaults:{email:_0x39ffx20},transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null}))});return _0x39ffx1e;})[_0xec80[54]]()[_0xec80[38]](function(_0x39ffx1c){_0x39ffx18=_[_0xec80[48]](_0x39ffx1c,function(_0x39ffx1b){return _0x39ffx1b[0]});return ;})[_0xec80[38]](function(){return _0x39ffx14[_0xec80[53]](_0x39ffx15,{transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null})})[_0xec80[38]](function(){return _0x39ffx14[_0xec80[52]](_0x39ffx16,{transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null})})[_0xec80[38]](function(){return _0x39ffx14[_0xec80[51]](_0x39ffx17,{transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null})})[_0xec80[38]](function(){return _0x39ffx14[_0xec80[50]](_0x39ffx18,{transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null})})[_0xec80[38]](function(){var _0x39ffx1a={status:_0x39ffx14[_0xec80[28]],from:_0x39ffx14[_0xec80[31]],to:_0x39ffx14[_0xec80[39]],cc:_0x39ffx14[_0xec80[40]],subject:_0x39ffx14[_0xec80[41]],html:_0x39ffx14[_0xec80[42]],text:_0x39ffx14[_0xec80[43]],headers:{"\x58\x2D\x4C\x61\x7A\x69\x6E\x65\x73\x73\x2D\x6C\x65\x76\x65\x6C":1000}};if(_0x39ffx14[_0xec80[44]]){_0x39ffx1a[_0xec80[45]]=_[_0xec80[48]](_0x39ffx14.MailAttachments,function(_0x39ffx1b){return {path:_0x39ffx1b[_0xec80[46]],filename:_0x39ffx1b[_0xec80[47]]}})};return _0x39ffxb[_0xec80[49]](_0x39ffx1a);})[_0xec80[38]](function(_0x39ffx19){return _0x39ffx14[_0xec80[37]]({messageId:_0x39ffx19[_0xec80[34]],status:_0xec80[35]},{transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null})})}else {return MailRoom[_0xec80[58]]({where:{id:_0x39ffx14[_0xec80[66]]},defaults:{subject:_0x39ffx14[_0xec80[41]],from:_0x39ffx14[_0xec80[31]],status:_0xec80[67],MailAccountId:_0x39ffxc[_0xec80[68]]},transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null})[_0xec80[61]](function(_0x39ffx26){_0x39ffx13=_0x39ffx26;return _0x39ffx26[_0xec80[62]](_0x39ffx14,{transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null});})[_0xec80[38]](function(){return ContactEmail[_0xec80[58]]({where:{email:_0x39ffx14[_0xec80[31]]},defaults:{email:_0x39ffx14[_0xec80[31]]},transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null})})[_0xec80[61]](function(_0x39ffx23){var _0x39ffx1e=[];var _0x39ffx25=_0x39ffx14[_0xec80[39]]?_0x39ffx14[_0xec80[39]][_0xec80[57]](_0xec80[56]):[];_0x39ffx15=_0x39ffx23;_0x39ffx25[_0xec80[60]](function(_0x39ffx20){_0x39ffx1e[_0xec80[59]](ContactEmail[_0xec80[58]]({where:{email:_0x39ffx20},defaults:{email:_0x39ffx20},transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null}))});return _0x39ffx1e;})[_0xec80[54]]()[_0xec80[38]](function(_0x39ffx21){var _0x39ffx1e=[];var _0x39ffx22=_0x39ffx14[_0xec80[40]]?_0x39ffx14[_0xec80[40]][_0xec80[57]](_0xec80[56]):[];_0x39ffx16=_[_0xec80[48]](_0x39ffx21,function(_0x39ffx1b){return _0x39ffx1b[0]});_0x39ffx22[_0xec80[60]](function(_0x39ffx20){_0x39ffx1e[_0xec80[59]](ContactEmail[_0xec80[58]]({where:{email:_0x39ffx20},defaults:{email:_0x39ffx20},transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null}))});return _0x39ffx1e;})[_0xec80[54]]()[_0xec80[38]](function(_0x39ffx1d){var _0x39ffx1e=[];var _0x39ffx1f=_0x39ffx14[_0xec80[55]]?_0x39ffx14[_0xec80[55]][_0xec80[57]](_0xec80[56]):[];_0x39ffx17=_[_0xec80[48]](_0x39ffx1d,function(_0x39ffx1b){return _0x39ffx1b[0]});_0x39ffx1f[_0xec80[60]](function(_0x39ffx20){_0x39ffx1e[_0xec80[59]](ContactEmail[_0xec80[58]]({where:{email:_0x39ffx20},defaults:{email:_0x39ffx20},transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null}))});return _0x39ffx1e;})[_0xec80[54]]()[_0xec80[38]](function(_0x39ffx1c){_0x39ffx18=_[_0xec80[48]](_0x39ffx1c,function(_0x39ffx1b){return _0x39ffx1b[0]});return ;})[_0xec80[38]](function(){return _0x39ffx14[_0xec80[53]](_0x39ffx15,{transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null})})[_0xec80[38]](function(){return _0x39ffx14[_0xec80[52]](_0x39ffx16,{transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null})})[_0xec80[38]](function(){return _0x39ffx14[_0xec80[51]](_0x39ffx17,{transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null})})[_0xec80[38]](function(){return _0x39ffx14[_0xec80[50]](_0x39ffx18,{transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null})})[_0xec80[38]](function(){var _0x39ffx1a={status:_0x39ffx14[_0xec80[28]],from:_0x39ffx14[_0xec80[31]],to:_0x39ffx14[_0xec80[39]],cc:_0x39ffx14[_0xec80[40]],subject:_0x39ffx14[_0xec80[41]],html:_0x39ffx14[_0xec80[42]],text:_0x39ffx14[_0xec80[43]],headers:{"\x58\x2D\x4C\x61\x7A\x69\x6E\x65\x73\x73\x2D\x6C\x65\x76\x65\x6C":1000}};if(_0x39ffx14[_0xec80[44]]){_0x39ffx1a[_0xec80[45]]=_[_0xec80[48]](_0x39ffx14.MailAttachments,function(_0x39ffx1b){return {path:_0x39ffx1b[_0xec80[46]],filename:_0x39ffx1b[_0xec80[47]]}})};return _0x39ffxb[_0xec80[49]](_0x39ffx1a);})[_0xec80[38]](function(_0x39ffx19){console[_0xec80[15]](_0xec80[65],_0x39ffx19);return _0x39ffx14[_0xec80[37]]({messageId:_0x39ffx19[_0xec80[34]],status:_0xec80[35]},{transaction:_0x39ffx12?_0x39ffx12[_0xec80[36]]:null});})};}}_0x39ffxd(_0x39ffxa);MailServerOut[_0xec80[69]](function(_0x39ffxa){_0x39ffxe(_0x39ffxa)});MailServerOut[_0xec80[70]](function(_0x39ffxa){_0x39ffxf(_0x39ffxa)});MailMessage[_0xec80[71]](function(_0x39ffxa,_0x39ffx12){return _0x39ffx10(_0x39ffxa,_0x39ffx12)});}};
\ No newline at end of file
+var _0xb2ec=["\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","\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"];_0xb2ec[0];var util=require(_0xb2ec[1]);var promise=require(_0xb2ec[2]);var _=require(_0xb2ec[3]);var nodemailer=require(_0xb2ec[4]);var smtpTransport=require(_0xb2ec[5]);var htmlToText=require(_0xb2ec[6]);var Room=require(_0xb2ec[8])[_0xb2ec[7]];var Account=require(_0xb2ec[8])[_0xb2ec[9]];var Message=require(_0xb2ec[8])[_0xb2ec[10]];var Server=require(_0xb2ec[8])[_0xb2ec[11]];var Attachment=require(_0xb2ec[8])[_0xb2ec[12]];var smtp;var timeout;process[_0xb2ec[14]](_0xb2ec[20],function(_0x2098x10){if(_0x2098x10[_0xb2ec[21]]===_0xb2ec[20]){return Message[_0xb2ec[25]](_0x2098x10[_0xb2ec[24]],{include:[{model:Attachment}]})[_0xb2ec[23]](function(_0x2098x11){onSend(_0x2098x11)})[_0xb2ec[22]](function(_0x2098xe){console[_0xb2ec[13]](_0x2098xe)})};if(_0x2098x10[_0xb2ec[21]]===_0xb2ec[26]){switch(_0x2098x10[_0xb2ec[26]]){case _0xb2ec[28]:onVerify(_0x2098x10[_0xb2ec[27]]);break;default:}}})[_0xb2ec[14]](_0xb2ec[15],function(_0x2098xf){console[_0xb2ec[19]](util[_0xb2ec[18]](_0xb2ec[16],process[_0xb2ec[17]][3],_0x2098xf))})[_0xb2ec[14]](_0xb2ec[13],function(_0x2098xe){console[_0xb2ec[13]](_0x2098xe)});console[_0xb2ec[19]](util[_0xb2ec[18]](_0xb2ec[29],process[_0xb2ec[17]][3],process[_0xb2ec[30]]));function onVerify(_0x2098x13){smtp[_0xb2ec[37]]()[_0xb2ec[23]](function(){process[_0xb2ec[34]]({type:_0xb2ec[26],state:_0xb2ec[35],source:null,log:util[_0xb2ec[18]](_0xb2ec[36],_0x2098x13,process[_0xb2ec[30]])})})[_0xb2ec[22]](function(_0x2098xe){process[_0xb2ec[34]]({type:_0xb2ec[26],state:_0xb2ec[31],source:JSON[_0xb2ec[32]](_0x2098xe),log:util[_0xb2ec[18]](_0xb2ec[33],_0x2098x13,process[_0xb2ec[30]])})})}function onSave(_0x2098x15){smtp=nodemailer[_0xb2ec[42]](smtpTransport({host:_0x2098x15[_0xb2ec[38]],port:_0x2098x15[_0xb2ec[39]],secure:_0x2098x15[_0xb2ec[40]],pool:true,auth:{user:_0x2098x15[_0xb2ec[27]],pass:_0x2098x15[_0xb2ec[41]]}}));smtp[_0xb2ec[43]]=_0x2098x15[_0xb2ec[44]];smtp[_0xb2ec[45]]=_0x2098x15[_0xb2ec[24]];smtp[_0xb2ec[27]]=_0x2098x15[_0xb2ec[27]];onVerify(_0x2098x15[_0xb2ec[27]])}function onSend(_0x2098x11){console[_0xb2ec[19]](util[_0xb2ec[18]](_0xb2ec[46],process[_0xb2ec[17]][3],process[_0xb2ec[30]]));if(_0x2098x11[_0xb2ec[47]]===_0xb2ec[48]){var _0x2098x17;var _0x2098x18=_0x2098x11;var _0x2098x19,_0x2098x1a,_0x2098x1b,_0x2098x1c;if(_0x2098x18[_0xb2ec[49]]){return Message[_0xb2ec[69]]({where:{messageId:_0x2098x18[_0xb2ec[49]]}})[_0xb2ec[23]](function(_0x2098x21){return _0x2098x21[_0xb2ec[68]]({include:{model:Account}})})[_0xb2ec[23]](function(_0x2098x20){_0x2098x17=_0x2098x20;return _0x2098x17[_0xb2ec[67]](_0x2098x18)})[_0xb2ec[23]](function(){return _0x2098x17[_0xb2ec[50]]({lastEvent:_0xb2ec[48]})})[_0xb2ec[23]](function(){return _0x2098x17[_0xb2ec[66]](_0x2098x18.UserId)})[_0xb2ec[23]](function(){var _0x2098x1e={status:_0x2098x18[_0xb2ec[47]],from:_0x2098x18[_0xb2ec[54]],to:_0x2098x18[_0xb2ec[55]],cc:_0x2098x18[_0xb2ec[56]],subject:_0x2098x18[_0xb2ec[57]],html:_0x2098x18[_0xb2ec[58]],text:_0x2098x18[_0xb2ec[58]]?htmlToText[_0xb2ec[59]](_0x2098x18[_0xb2ec[58]],{wordwrap:false}):null};if(_0x2098x18[_0xb2ec[60]]){_0x2098x1e[_0xb2ec[61]]=_[_0xb2ec[64]](_0x2098x18.MailAttachments,function(_0x2098x1f){return {path:_0x2098x1f[_0xb2ec[62]],filename:_0x2098x1f[_0xb2ec[63]]}})};return smtp[_0xb2ec[65]](_0x2098x1e)})[_0xb2ec[23]](function(_0x2098x1d){process[_0xb2ec[34]]({msgId:_0x2098x18[_0xb2ec[24]],roomId:_0x2098x17[_0xb2ec[24]],type:_0xb2ec[50],messageId:_0x2098x1d[_0xb2ec[52]],status:_0xb2ec[53]})})[_0xb2ec[22]](function(_0x2098xe){process[_0xb2ec[34]]({msgId:_0x2098x18[_0xb2ec[24]],roomId:_0x2098x17[_0xb2ec[24]],type:_0xb2ec[50],status:_0xb2ec[51]})})}else {return Account[_0xb2ec[25]](smtp[_0xb2ec[43]])[_0xb2ec[23]](function(_0x2098x22){if(_0x2098x11[_0xb2ec[70]]){return Room[_0xb2ec[25]](_0x2098x11.MailRoomId)}else {return Room[_0xb2ec[75]]({subject:_0x2098x18[_0xb2ec[57]],from:_0x2098x18[_0xb2ec[54]][_0xb2ec[72]](_0xb2ec[71]),account:_0x2098x22?_0x2098x22[_0xb2ec[63]]:null,status:_0xb2ec[73],lastEvent:_0xb2ec[48],MailAccountId:_0x2098x22?_0x2098x22[_0xb2ec[24]]:null},{userId:_0x2098x18[_0xb2ec[74]]})}})[_0xb2ec[23]](function(_0x2098x20){_0x2098x17=_0x2098x20;return _0x2098x17[_0xb2ec[67]](_0x2098x18[_0xb2ec[24]])})[_0xb2ec[23]](function(){return _0x2098x17[_0xb2ec[66]](_0x2098x18.UserId)})[_0xb2ec[23]](function(){var _0x2098x1e={status:_0x2098x18[_0xb2ec[47]],from:_0x2098x18[_0xb2ec[54]],to:_0x2098x18[_0xb2ec[55]],cc:_0x2098x18[_0xb2ec[56]],subject:_0x2098x18[_0xb2ec[57]],html:_0x2098x18[_0xb2ec[58]],text:_0x2098x18[_0xb2ec[58]]?htmlToText[_0xb2ec[59]](_0x2098x18[_0xb2ec[58]],{wordwrap:false}):null};if(_0x2098x18[_0xb2ec[60]]){_0x2098x1e[_0xb2ec[61]]=_[_0xb2ec[64]](_0x2098x18.MailAttachments,function(_0x2098x1f){return {path:_0x2098x1f[_0xb2ec[62]],filename:_0x2098x1f[_0xb2ec[63]]}})};return smtp[_0xb2ec[65]](_0x2098x1e)})[_0xb2ec[23]](function(_0x2098x1d){process[_0xb2ec[34]]({msgId:_0x2098x18[_0xb2ec[24]],roomId:_0x2098x17[_0xb2ec[24]],type:_0xb2ec[50],messageId:_0x2098x1d[_0xb2ec[52]],status:_0xb2ec[53]})})[_0xb2ec[22]](function(_0x2098xe){process[_0xb2ec[34]]({msgId:_0x2098x18[_0xb2ec[24]],roomId:_0x2098x17[_0xb2ec[24]],type:_0xb2ec[50],status:_0xb2ec[51]})})}}}Server[_0xb2ec[25]](process[_0xb2ec[17]][2])[_0xb2ec[23]](function(_0x2098x15){onSave(_0x2098x15)})[_0xb2ec[22]](function(_0x2098xe){console[_0xb2ec[13]](_0x2098xe)})
\ No newline at end of file