Built motion from commit 36b8e3b.|0.0.111
[motion.git] / server / config / smtp / smtp.js
index 21dfef6..182ff64 100644 (file)
@@ -1 +1 @@
-var _0x29f3=["\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","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x6F\x6E\x74\x61\x63\x74","\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","\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","\x73\x74\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\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","\x53\x45\x4E\x44\x49\x4E\x47","\x66\x72\x6F\x6D","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x49\x6E\x74\x65\x72\x6E\x61\x6C\x20\x53\x65\x72\x76\x65\x72\x20\x45\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\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","\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","\x3B","\x6A\x6F\x69\x6E","\x69\x64","\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","\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","\x65\x78\x70\x6F\x72\x74\x73"];_0x29f3[0];var _=require(_0x29f3[1]);var Promise=require(_0x29f3[2]);var nodemailer=require(_0x29f3[3]);var smtpTransport=require(_0x29f3[4]);var Agent=require(_0x29f3[6])[_0x29f3[5]];var Contact=require(_0x29f3[6])[_0x29f3[7]];var MailRoom=require(_0x29f3[6])[_0x29f3[8]];var MailMessage=require(_0x29f3[6])[_0x29f3[9]];var ContactEmail=require(_0x29f3[6])[_0x29f3[10]];var MailServerOut=require(_0x29f3[6])[_0x29f3[11]];function Smtp(_0xb508xc){var _0xb508xd;var _0xb508xe;function _0xb508xf(_0xb508xc){console[_0x29f3[15]](_0x29f3[12]+_0xb508xc[_0x29f3[13]]+_0x29f3[14]);_0xb508xe=_0xb508xc;_0xb508xd=nodemailer[_0x29f3[20]](smtpTransport({host:_0xb508xc[_0x29f3[16]],port:_0xb508xc[_0x29f3[17]],secure:_0xb508xc[_0x29f3[18]],debug:true,auth:{user:_0xb508xc[_0x29f3[13]],pass:_0xb508xc[_0x29f3[19]]}}))}function _0xb508x10(_0xb508xc){if(!_0xb508xc[_0x29f3[22]](_0x29f3[21])&&_0xb508xd[_0x29f3[26]][_0x29f3[25]][_0x29f3[24]][_0x29f3[23]]===_0xb508xc[_0x29f3[13]]){console[_0x29f3[15]](_0x29f3[12]+_0xb508xc[_0x29f3[13]]+_0x29f3[27]);_0xb508xd=null;_0xb508xd=nodemailer[_0x29f3[20]](smtpTransport({host:_0xb508xc[_0x29f3[16]],port:_0xb508xc[_0x29f3[17]],secure:_0xb508xc[_0x29f3[18]],debug:true,auth:{user:_0xb508xc[_0x29f3[13]],pass:_0xb508xc[_0x29f3[19]]}}))}}function _0xb508x11(_0xb508xc){if(_0xb508xd[_0x29f3[26]][_0x29f3[25]][_0x29f3[24]][_0x29f3[23]]===_0xb508xc[_0x29f3[13]]){console[_0x29f3[15]](_0x29f3[28]+_0xb508xc[_0x29f3[13]]+_0x29f3[29]);_0xb508xd=null}}function _0xb508x12(_0xb508x13,_0xb508x14){if(_0xb508x13[_0x29f3[30]]===_0x29f3[31]&&_0xb508xd[_0x29f3[26]][_0x29f3[25]][_0x29f3[24]][_0x29f3[23]]===_0xb508x13[_0x29f3[33]][_0x29f3[32]]){var _0xb508x15;var _0xb508x16=_0xb508x13;var _0xb508x17,_0xb508x18,_0xb508x19,_0xb508x1a;if(_0xb508x16[_0x29f3[34]]){return MailMessage[_0x29f3[73]]({where:{messageId:_0xb508x16[_0x29f3[34]]}})[_0x29f3[45]](function(_0xb508x2a){return _0xb508x2a[_0x29f3[72]]()})[_0x29f3[45]](function(_0xb508x29){_0xb508x15=_0xb508x29;return _0xb508x15[_0x29f3[71]](_0xb508x16,{transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})})[_0x29f3[45]](function(){if(_0xb508x14[_0x29f3[23]]){return _0xb508x15[_0x29f3[70]](_0xb508x14[_0x29f3[23]][_0x29f3[69]],{transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})}})[_0x29f3[45]](function(){return ContactEmail[_0x29f3[63]]({where:{email:_0xb508x16[_0x29f3[32]][_0x29f3[68]](_0x29f3[67])},defaults:{email:_0xb508x16[_0x29f3[32]][_0x29f3[68]](_0x29f3[67])},transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})})[_0x29f3[66]](function(_0xb508x26,_0xb508x27){var _0xb508x21=[];var _0xb508x28=_0xb508x16[_0x29f3[46]]||[];_0xb508x17=_0xb508x26;_0xb508x28[_0x29f3[65]](function(_0xb508x23){_0xb508x21[_0x29f3[64]](ContactEmail[_0x29f3[63]]({where:{email:_0xb508x23},defaults:{email:_0xb508x23},transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null}))});return _0xb508x21})[_0x29f3[61]]()[_0x29f3[45]](function(_0xb508x24){var _0xb508x21=[];var _0xb508x25=_0xb508x16[_0x29f3[47]]||[];_0xb508x18=_[_0x29f3[55]](_0xb508x24,function(_0xb508x1e){return _0xb508x1e[0]});_0xb508x25[_0x29f3[65]](function(_0xb508x23){_0xb508x21[_0x29f3[64]](ContactEmail[_0x29f3[63]]({where:{email:_0xb508x23},defaults:{email:_0xb508x23},transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null}))});return _0xb508x21})[_0x29f3[61]]()[_0x29f3[45]](function(_0xb508x20){var _0xb508x21=[];var _0xb508x22=_0xb508x16[_0x29f3[62]]||[];_0xb508x19=_[_0x29f3[55]](_0xb508x20,function(_0xb508x1e){return _0xb508x1e[0]});_0xb508x22[_0x29f3[65]](function(_0xb508x23){_0xb508x21[_0x29f3[64]](ContactEmail[_0x29f3[63]]({where:{email:_0xb508x23},defaults:{email:_0xb508x23},transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null}))});return _0xb508x21})[_0x29f3[61]]()[_0x29f3[45]](function(_0xb508x1f){_0xb508x1a=_[_0x29f3[55]](_0xb508x1f,function(_0xb508x1e){return _0xb508x1e[0]});return})[_0x29f3[45]](function(){return _0xb508x16[_0x29f3[60]](_0xb508x17,{transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})})[_0x29f3[45]](function(){return _0xb508x16[_0x29f3[59]](_0xb508x18,{transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})})[_0x29f3[45]](function(){return _0xb508x16[_0x29f3[58]](_0xb508x19,{transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})})[_0x29f3[45]](function(){return _0xb508x16[_0x29f3[57]](_0xb508x1a,{transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})})[_0x29f3[45]](function(){var _0xb508x1d={status:_0xb508x16[_0x29f3[30]],from:_0xb508x16[_0x29f3[32]],to:_0xb508x16[_0x29f3[46]],cc:_0xb508x16[_0x29f3[47]],subject:_0xb508x16[_0x29f3[48]],html:_0xb508x16[_0x29f3[49]],text:_0xb508x16[_0x29f3[50]],headers:{"\x58\x2D\x4C\x61\x7A\x69\x6E\x65\x73\x73\x2D\x6C\x65\x76\x65\x6C":1000}};if(_0xb508x16[_0x29f3[51]]){_0xb508x1d[_0x29f3[52]]=_[_0x29f3[55]](_0xb508x16.MailAttachments,function(_0xb508x1e){return {path:_0xb508x1e[_0x29f3[53]],filename:_0xb508x1e[_0x29f3[54]]}})};return _0xb508xd[_0x29f3[56]](_0xb508x1d)})[_0x29f3[45]](function(_0xb508x1c){return _0xb508x16[_0x29f3[44]]({messageId:_0xb508x1c[_0x29f3[41]],status:_0x29f3[42]},{transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})})[_0x29f3[40]](function(_0xb508x1b){console[_0x29f3[36]](_0x29f3[35],_0xb508x1b);throw {message:_0xb508x1b[_0x29f3[37]]||_0xb508x1b[_0x29f3[38]]||_0x29f3[39]}})}else {console[_0x29f3[15]](_0x29f3[32],_0xb508x16[_0x29f3[32]]);return MailRoom[_0x29f3[63]]({where:{id:_0xb508x16[_0x29f3[75]]},defaults:{subject:_0xb508x16[_0x29f3[48]],from:_0xb508x16[_0x29f3[32]][_0x29f3[68]](_0x29f3[67]),status:_0x29f3[76],MailAccountId:_0xb508xe[_0x29f3[77]]},transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})[_0x29f3[66]](function(_0xb508x29){_0xb508x15=_0xb508x29;return _0xb508x15[_0x29f3[71]](_0xb508x16,{transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})})[_0x29f3[45]](function(){if(_0xb508x14[_0x29f3[23]]){return _0xb508x15[_0x29f3[70]](_0xb508x14[_0x29f3[23]][_0x29f3[69]],{transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})}})[_0x29f3[45]](function(){return ContactEmail[_0x29f3[63]]({where:{email:_0xb508x16[_0x29f3[32]][_0x29f3[68]](_0x29f3[67])},defaults:{email:_0xb508x16[_0x29f3[32]][_0x29f3[68]](_0x29f3[67])},transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})})[_0x29f3[66]](function(_0xb508x26){var _0xb508x21=[];var _0xb508x28=_0xb508x16[_0x29f3[46]]||[];_0xb508x17=_0xb508x26;_0xb508x28[_0x29f3[65]](function(_0xb508x23){_0xb508x21[_0x29f3[64]](ContactEmail[_0x29f3[63]]({where:{email:_0xb508x23},defaults:{email:_0xb508x23},transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null}))});return _0xb508x21})[_0x29f3[61]]()[_0x29f3[45]](function(_0xb508x24){var _0xb508x21=[];var _0xb508x25=_0xb508x16[_0x29f3[47]]||[];_0xb508x18=_[_0x29f3[55]](_0xb508x24,function(_0xb508x1e){return _0xb508x1e[0]});_0xb508x25[_0x29f3[65]](function(_0xb508x23){_0xb508x21[_0x29f3[64]](ContactEmail[_0x29f3[63]]({where:{email:_0xb508x23},defaults:{email:_0xb508x23},transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null}))});return _0xb508x21})[_0x29f3[61]]()[_0x29f3[45]](function(_0xb508x20){var _0xb508x21=[];var _0xb508x22=_0xb508x16[_0x29f3[62]]||[];_0xb508x19=_[_0x29f3[55]](_0xb508x20,function(_0xb508x1e){return _0xb508x1e[0]});_0xb508x22[_0x29f3[65]](function(_0xb508x23){_0xb508x21[_0x29f3[64]](ContactEmail[_0x29f3[63]]({where:{email:_0xb508x23},defaults:{email:_0xb508x23},transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null}))});return _0xb508x21})[_0x29f3[61]]()[_0x29f3[45]](function(_0xb508x1f){_0xb508x1a=_[_0x29f3[55]](_0xb508x1f,function(_0xb508x1e){return _0xb508x1e[0]});return})[_0x29f3[45]](function(){return _0xb508x16[_0x29f3[60]](_0xb508x17,{transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})})[_0x29f3[45]](function(){return _0xb508x16[_0x29f3[59]](_0xb508x18,{transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})})[_0x29f3[45]](function(){return _0xb508x16[_0x29f3[58]](_0xb508x19,{transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})})[_0x29f3[45]](function(){return _0xb508x16[_0x29f3[57]](_0xb508x1a,{transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})})[_0x29f3[45]](function(){var _0xb508x1d={status:_0xb508x16[_0x29f3[30]],from:_0xb508x16[_0x29f3[32]],to:_0xb508x16[_0x29f3[46]],cc:_0xb508x16[_0x29f3[47]],subject:_0xb508x16[_0x29f3[48]],html:_0xb508x16[_0x29f3[49]],text:_0xb508x16[_0x29f3[50]],headers:{"\x58\x2D\x4C\x61\x7A\x69\x6E\x65\x73\x73\x2D\x6C\x65\x76\x65\x6C":1000}};if(_0xb508x16[_0x29f3[51]]){_0xb508x1d[_0x29f3[52]]=_[_0x29f3[55]](_0xb508x16.MailAttachments,function(_0xb508x1e){return {path:_0xb508x1e[_0x29f3[53]],filename:_0xb508x1e[_0x29f3[54]]}})};return _0xb508xd[_0x29f3[56]](_0xb508x1d)})[_0x29f3[45]](function(_0xb508x1c){console[_0x29f3[15]](_0x29f3[74],_0xb508x1c);return _0xb508x16[_0x29f3[44]]({messageId:_0xb508x1c[_0x29f3[41]],status:_0x29f3[42]},{transaction:_0xb508x14?_0xb508x14[_0x29f3[43]]:null})})[_0x29f3[40]](function(_0xb508x1b){console[_0x29f3[36]](_0x29f3[35],_0xb508x1b);throw {message:_0xb508x1b[_0x29f3[37]]||_0xb508x1b[_0x29f3[38]]||_0x29f3[39]}})}}}_0xb508xf(_0xb508xc);MailServerOut[_0x29f3[78]](function(_0xb508xc){return _0xb508x10(_0xb508xc)});MailServerOut[_0x29f3[79]](function(_0xb508xc){return _0xb508x11(_0xb508xc)});MailMessage[_0x29f3[80]](function(_0xb508xc,_0xb508x14){return _0xb508x12(_0xb508xc,_0xb508x14)});return {}}module[_0x29f3[81]]=Smtp
\ No newline at end of file
+var _0x1f96=["\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","\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","\x63\x61\x74\x63\x68","\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","\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","\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","\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","\x66\x69\x6E\x64\x42\x79\x49\x64","\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","\x4F\x50\x45\x4E","\x55\x73\x65\x72\x49\x64","\x63\x72\x65\x61\x74\x65"];_0x1f96[0];var util=require(_0x1f96[1]);var promise=require(_0x1f96[2]);var _=require(_0x1f96[3]);var Mustache=require(_0x1f96[4]);var nodemailer=require(_0x1f96[5]);var smtpTransport=require(_0x1f96[6]);var htmlToText=require(_0x1f96[7]);var Agent=require(_0x1f96[9])[_0x1f96[8]];var Room=require(_0x1f96[9])[_0x1f96[10]];var Template=require(_0x1f96[9])[_0x1f96[11]];var Account=require(_0x1f96[9])[_0x1f96[12]];var Message=require(_0x1f96[9])[_0x1f96[13]];var Server=require(_0x1f96[9])[_0x1f96[14]];var Attachment=require(_0x1f96[9])[_0x1f96[15]];var smtp;var timeout;process[_0x1f96[17]](_0x1f96[23],function(_0x67dcx13){if(_0x67dcx13[_0x1f96[24]]===_0x1f96[23]){onSend(_0x67dcx13)};if(_0x67dcx13[_0x1f96[24]]===_0x1f96[25]){switch(_0x67dcx13[_0x1f96[25]]){case _0x1f96[27]:onVerify(_0x67dcx13[_0x1f96[26]]);break;default:}}})[_0x1f96[17]](_0x1f96[18],function(_0x67dcx12){console[_0x1f96[22]](util[_0x1f96[21]](_0x1f96[19],process[_0x1f96[20]][3],_0x67dcx12))})[_0x1f96[17]](_0x1f96[16],function(_0x67dcx11){console[_0x1f96[16]](_0x67dcx11)});console[_0x1f96[22]](util[_0x1f96[21]](_0x1f96[28],process[_0x1f96[20]][3],process[_0x1f96[29]]));function onVerify(_0x67dcx15){smtp[_0x1f96[38]]()[_0x1f96[37]](function(){process[_0x1f96[33]]({type:_0x1f96[25],state:_0x1f96[35],source:null,log:util[_0x1f96[21]](_0x1f96[36],_0x67dcx15,process[_0x1f96[29]])})})[_0x1f96[34]](function(_0x67dcx11){process[_0x1f96[33]]({type:_0x1f96[25],state:_0x1f96[30],source:JSON[_0x1f96[31]](_0x67dcx11),log:util[_0x1f96[21]](_0x1f96[32],_0x67dcx15,process[_0x1f96[29]])})})}function onSave(_0x67dcx17){smtp=nodemailer[_0x1f96[43]](smtpTransport({host:_0x67dcx17[_0x1f96[39]],port:_0x67dcx17[_0x1f96[40]],secure:_0x67dcx17[_0x1f96[41]],pool:true,auth:{user:_0x67dcx17[_0x1f96[26]],pass:_0x67dcx17[_0x1f96[42]]}}));smtp[_0x1f96[44]]=_0x67dcx17[_0x1f96[45]];smtp[_0x1f96[46]]=_0x67dcx17[_0x1f96[47]];smtp[_0x1f96[26]]=_0x67dcx17[_0x1f96[26]];onVerify(_0x67dcx17[_0x1f96[26]])}function onSend(_0x67dcx19){console[_0x1f96[22]](util[_0x1f96[21]](_0x1f96[48],process[_0x1f96[20]][3],process[_0x1f96[29]]));if(_0x67dcx19[_0x1f96[49]]===_0x1f96[50]){var _0x67dcx1a;var _0x67dcx1b;var _0x67dcx1c;var _0x67dcx1d=_0x67dcx19;var _0x67dcx1e,_0x67dcx1f,_0x67dcx20,_0x67dcx21;if(_0x67dcx1d[_0x1f96[51]]){return Message[_0x1f96[81]]({where:{messageId:_0x67dcx1d[_0x1f96[51]]}})[_0x1f96[37]](function(_0x67dcx28){return _0x67dcx28[_0x1f96[80]]({include:{model:Account,include:[{model:Template}]}})})[_0x1f96[37]](function(_0x67dcx27){_0x67dcx1a=_0x67dcx27;_0x67dcx1b=_0x67dcx27[_0x1f96[12]];return _0x67dcx1a[_0x1f96[79]](_0x67dcx1d[_0x1f96[47]])})[_0x1f96[37]](function(){return _0x67dcx1a[_0x1f96[52]]({lastEvent:_0x1f96[50],attachment:_0x67dcx1d[_0x1f96[70]]&&_0x67dcx1d[_0x1f96[70]][_0x1f96[77]],mailOut:++_0x67dcx1a[_0x1f96[78]]})})[_0x1f96[37]](function(){return Agent[_0x1f96[76]](_0x67dcx1d.UserId)})[_0x1f96[37]](function(_0x67dcx26){_0x67dcx1c=_0x67dcx26;return _0x67dcx1a[_0x1f96[75]](_0x67dcx1c)})[_0x1f96[37]](function(){_0x67dcx1d[_0x1f96[57]]=_0x67dcx1d[_0x1f96[57]].toString(_0x1f96[58]);_0x67dcx1d[_0x1f96[59]]=_0x67dcx1d[_0x1f96[59]].toString(_0x1f96[58]);var _0x67dcx23=_0x67dcx1b[_0x1f96[11]]?Mustache[_0x1f96[69]](_0x67dcx1b[_0x1f96[11]][_0x1f96[57]],{interactionId:_0x67dcx1a[_0x1f96[47]],subject:_0x67dcx1d[_0x1f96[60]],body:_0x67dcx1d[_0x1f96[57]]?htmlToText[_0x1f96[61]](_0x67dcx1d[_0x1f96[57]],{wordwrap:false}):null,accountName:_0x67dcx1b[_0x1f96[62]],from:_0x67dcx1d[_0x1f96[63]],to:_0x67dcx1d[_0x1f96[64]],cc:_0x67dcx1d[_0x1f96[65]],agentName:_0x67dcx1c[_0x1f96[66]],agentEmail:_0x67dcx1c[_0x1f96[67]],createdAt:_0x67dcx1d[_0x1f96[68]]}):_0x67dcx1d[_0x1f96[57]];var _0x67dcx24={status:_0x67dcx1d[_0x1f96[49]],from:_0x67dcx1d[_0x1f96[63]],to:_0x67dcx1d[_0x1f96[64]],cc:_0x67dcx1d[_0x1f96[65]],subject:_0x67dcx1d[_0x1f96[60]],html:_0x67dcx23,text:_0x67dcx1d[_0x1f96[57]]?htmlToText[_0x1f96[61]](_0x67dcx1d[_0x1f96[57]],{wordwrap:false}):null};if(_0x67dcx1d[_0x1f96[70]]){_0x67dcx24[_0x1f96[71]]=_[_0x1f96[73]](_0x67dcx1d.MailAttachments,function(_0x67dcx25){return {path:_0x67dcx25[_0x1f96[72]],filename:_0x67dcx25[_0x1f96[62]]}})};return smtp[_0x1f96[74]](_0x67dcx24)})[_0x1f96[37]](function(_0x67dcx22){process[_0x1f96[33]]({msgId:_0x67dcx1d[_0x1f96[47]],roomId:_0x67dcx1a[_0x1f96[47]],type:_0x1f96[52],messageId:_0x67dcx22[_0x1f96[55]],status:_0x1f96[56],retry:_0x67dcx1d[_0x1f96[54]]})})[_0x1f96[34]](function(_0x67dcx11){console[_0x1f96[16]](_0x67dcx11);process[_0x1f96[33]]({msgId:_0x67dcx1d[_0x1f96[47]],roomId:_0x67dcx1a[_0x1f96[47]],type:_0x1f96[52],status:_0x1f96[53],retry:_0x67dcx1d[_0x1f96[54]]})})}else {return Account[_0x1f96[76]](smtp[_0x1f96[44]],{include:[{model:Template}]})[_0x1f96[37]](function(_0x67dcx29){_0x67dcx1b=_0x67dcx29;if(_0x67dcx19[_0x1f96[82]]){return Room[_0x1f96[76]](_0x67dcx19.MailRoomId)}else {return Room[_0x1f96[85]]({subject:_0x67dcx1d[_0x1f96[60]],from:_0x67dcx1d[_0x1f96[63]],account:_0x67dcx29?_0x67dcx29[_0x1f96[62]]:null,status:_0x1f96[83],lastEvent:_0x1f96[50],attachment:_0x67dcx1d[_0x1f96[70]]&&_0x67dcx1d[_0x1f96[70]][_0x1f96[77]],MailAccountId:_0x67dcx29?_0x67dcx29[_0x1f96[47]]:null,mailOut:1},{userId:_0x67dcx1d[_0x1f96[84]]})}})[_0x1f96[37]](function(_0x67dcx27){_0x67dcx1a=_0x67dcx27;return _0x67dcx1a[_0x1f96[79]](_0x67dcx1d[_0x1f96[47]])})[_0x1f96[37]](function(){return Agent[_0x1f96[76]](_0x67dcx1d.UserId)})[_0x1f96[37]](function(_0x67dcx26){_0x67dcx1c=_0x67dcx26;return _0x67dcx1a[_0x1f96[75]](_0x67dcx1c)})[_0x1f96[37]](function(){_0x67dcx1d[_0x1f96[57]]=_0x67dcx1d[_0x1f96[57]].toString(_0x1f96[58]);_0x67dcx1d[_0x1f96[59]]=_0x67dcx1d[_0x1f96[59]].toString(_0x1f96[58]);var _0x67dcx23=_0x67dcx1b[_0x1f96[11]]?Mustache[_0x1f96[69]](_0x67dcx1b[_0x1f96[11]][_0x1f96[57]],{interactionId:_0x67dcx1a[_0x1f96[47]],subject:_0x67dcx1d[_0x1f96[60]],body:_0x67dcx1d[_0x1f96[57]]?htmlToText[_0x1f96[61]](_0x67dcx1d[_0x1f96[57]],{wordwrap:false}):null,accountName:_0x67dcx1b[_0x1f96[62]],from:_0x67dcx1d[_0x1f96[63]],to:_0x67dcx1d[_0x1f96[64]],cc:_0x67dcx1d[_0x1f96[65]],agentName:_0x67dcx1c[_0x1f96[66]],agentEmail:_0x67dcx1c[_0x1f96[67]],createdAt:_0x67dcx1d[_0x1f96[68]]}):_0x67dcx1d[_0x1f96[57]];var _0x67dcx24={status:_0x67dcx1d[_0x1f96[49]],from:_0x67dcx1d[_0x1f96[63]],to:_0x67dcx1d[_0x1f96[64]],cc:_0x67dcx1d[_0x1f96[65]],subject:_0x67dcx1d[_0x1f96[60]],html:_0x67dcx23,text:_0x67dcx1d[_0x1f96[57]]?htmlToText[_0x1f96[61]](_0x67dcx1d[_0x1f96[57]],{wordwrap:false}):null};if(_0x67dcx1d[_0x1f96[70]]){_0x67dcx24[_0x1f96[71]]=_[_0x1f96[73]](_0x67dcx1d.MailAttachments,function(_0x67dcx25){return {path:_0x67dcx25[_0x1f96[72]],filename:_0x67dcx25[_0x1f96[62]]}})};return smtp[_0x1f96[74]](_0x67dcx24)})[_0x1f96[37]](function(_0x67dcx22){process[_0x1f96[33]]({msgId:_0x67dcx1d[_0x1f96[47]],roomId:_0x67dcx1a[_0x1f96[47]],type:_0x1f96[52],messageId:_0x67dcx22[_0x1f96[55]],status:_0x1f96[56],retry:_0x67dcx1d[_0x1f96[54]]})})[_0x1f96[34]](function(_0x67dcx11){console[_0x1f96[16]](_0x67dcx11);process[_0x1f96[33]]({msgId:_0x67dcx1d[_0x1f96[47]],roomId:_0x67dcx1a[_0x1f96[47]],type:_0x1f96[52],status:_0x1f96[53],retry:_0x67dcx1d[_0x1f96[54]]})})}}}Server[_0x1f96[76]](process[_0x1f96[20]][2])[_0x1f96[37]](function(_0x67dcx17){onSave(_0x67dcx17)})[_0x1f96[34]](function(_0x67dcx11){console[_0x1f96[16]](_0x67dcx11)})
\ No newline at end of file