Built motion from commit 5fc88b3.|0.0.60
[motion.git] / server / config / smtp / smtp.js
1 var _0xb0f0=["\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"];_0xb0f0[0];var _=require(_0xb0f0[1]);var Promise=require(_0xb0f0[2]);var nodemailer=require(_0xb0f0[3]);var smtpTransport=require(_0xb0f0[4]);var Agent=require(_0xb0f0[6])[_0xb0f0[5]];var Contact=require(_0xb0f0[6])[_0xb0f0[7]];var MailRoom=require(_0xb0f0[6])[_0xb0f0[8]];var MailMessage=require(_0xb0f0[6])[_0xb0f0[9]];var ContactEmail=require(_0xb0f0[6])[_0xb0f0[10]];var MailServerOut=require(_0xb0f0[6])[_0xb0f0[11]];function Smtp(_0x11c8xc){var _0x11c8xd;var _0x11c8xe;function _0x11c8xf(_0x11c8xc){console[_0xb0f0[15]](_0xb0f0[12]+_0x11c8xc[_0xb0f0[13]]+_0xb0f0[14]);_0x11c8xe=_0x11c8xc;_0x11c8xd=nodemailer[_0xb0f0[20]](smtpTransport({host:_0x11c8xc[_0xb0f0[16]],port:_0x11c8xc[_0xb0f0[17]],secure:_0x11c8xc[_0xb0f0[18]],debug:true,auth:{user:_0x11c8xc[_0xb0f0[13]],pass:_0x11c8xc[_0xb0f0[19]]}}))}function _0x11c8x10(_0x11c8xc){if(!_0x11c8xc[_0xb0f0[22]](_0xb0f0[21])&&_0x11c8xd[_0xb0f0[26]][_0xb0f0[25]][_0xb0f0[24]][_0xb0f0[23]]===_0x11c8xc[_0xb0f0[13]]){console[_0xb0f0[15]](_0xb0f0[12]+_0x11c8xc[_0xb0f0[13]]+_0xb0f0[27]);_0x11c8xd=null;_0x11c8xd=nodemailer[_0xb0f0[20]](smtpTransport({host:_0x11c8xc[_0xb0f0[16]],port:_0x11c8xc[_0xb0f0[17]],secure:_0x11c8xc[_0xb0f0[18]],debug:true,auth:{user:_0x11c8xc[_0xb0f0[13]],pass:_0x11c8xc[_0xb0f0[19]]}}))}}function _0x11c8x11(_0x11c8xc){if(_0x11c8xd[_0xb0f0[26]][_0xb0f0[25]][_0xb0f0[24]][_0xb0f0[23]]===_0x11c8xc[_0xb0f0[13]]){console[_0xb0f0[15]](_0xb0f0[28]+_0x11c8xc[_0xb0f0[13]]+_0xb0f0[29]);_0x11c8xd=null}}function _0x11c8x12(_0x11c8x13,_0x11c8x14){if(_0x11c8x13[_0xb0f0[30]]===_0xb0f0[31]&&_0x11c8xd[_0xb0f0[26]][_0xb0f0[25]][_0xb0f0[24]][_0xb0f0[23]]===_0x11c8x13[_0xb0f0[33]][_0xb0f0[32]]){var _0x11c8x15;var _0x11c8x16=_0x11c8x13;var _0x11c8x17,_0x11c8x18,_0x11c8x19,_0x11c8x1a;if(_0x11c8x16[_0xb0f0[34]]){return MailMessage[_0xb0f0[73]]({where:{messageId:_0x11c8x16[_0xb0f0[34]]}})[_0xb0f0[45]](function(_0x11c8x2a){return _0x11c8x2a[_0xb0f0[72]]()})[_0xb0f0[45]](function(_0x11c8x29){_0x11c8x15=_0x11c8x29;return _0x11c8x15[_0xb0f0[71]](_0x11c8x16,{transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})})[_0xb0f0[45]](function(){if(_0x11c8x14[_0xb0f0[23]]){return _0x11c8x15[_0xb0f0[70]](_0x11c8x14[_0xb0f0[23]][_0xb0f0[69]],{transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})}})[_0xb0f0[45]](function(){return ContactEmail[_0xb0f0[63]]({where:{email:_0x11c8x16[_0xb0f0[32]][_0xb0f0[68]](_0xb0f0[67])},defaults:{email:_0x11c8x16[_0xb0f0[32]][_0xb0f0[68]](_0xb0f0[67])},transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})})[_0xb0f0[66]](function(_0x11c8x26,_0x11c8x27){var _0x11c8x21=[];var _0x11c8x28=_0x11c8x16[_0xb0f0[46]]||[];_0x11c8x17=_0x11c8x26;_0x11c8x28[_0xb0f0[65]](function(_0x11c8x23){_0x11c8x21[_0xb0f0[64]](ContactEmail[_0xb0f0[63]]({where:{email:_0x11c8x23},defaults:{email:_0x11c8x23},transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null}))});return _0x11c8x21})[_0xb0f0[61]]()[_0xb0f0[45]](function(_0x11c8x24){var _0x11c8x21=[];var _0x11c8x25=_0x11c8x16[_0xb0f0[47]]||[];_0x11c8x18=_[_0xb0f0[55]](_0x11c8x24,function(_0x11c8x1e){return _0x11c8x1e[0]});_0x11c8x25[_0xb0f0[65]](function(_0x11c8x23){_0x11c8x21[_0xb0f0[64]](ContactEmail[_0xb0f0[63]]({where:{email:_0x11c8x23},defaults:{email:_0x11c8x23},transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null}))});return _0x11c8x21})[_0xb0f0[61]]()[_0xb0f0[45]](function(_0x11c8x20){var _0x11c8x21=[];var _0x11c8x22=_0x11c8x16[_0xb0f0[62]]||[];_0x11c8x19=_[_0xb0f0[55]](_0x11c8x20,function(_0x11c8x1e){return _0x11c8x1e[0]});_0x11c8x22[_0xb0f0[65]](function(_0x11c8x23){_0x11c8x21[_0xb0f0[64]](ContactEmail[_0xb0f0[63]]({where:{email:_0x11c8x23},defaults:{email:_0x11c8x23},transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null}))});return _0x11c8x21})[_0xb0f0[61]]()[_0xb0f0[45]](function(_0x11c8x1f){_0x11c8x1a=_[_0xb0f0[55]](_0x11c8x1f,function(_0x11c8x1e){return _0x11c8x1e[0]});return})[_0xb0f0[45]](function(){return _0x11c8x16[_0xb0f0[60]](_0x11c8x17,{transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})})[_0xb0f0[45]](function(){return _0x11c8x16[_0xb0f0[59]](_0x11c8x18,{transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})})[_0xb0f0[45]](function(){return _0x11c8x16[_0xb0f0[58]](_0x11c8x19,{transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})})[_0xb0f0[45]](function(){return _0x11c8x16[_0xb0f0[57]](_0x11c8x1a,{transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})})[_0xb0f0[45]](function(){var _0x11c8x1d={status:_0x11c8x16[_0xb0f0[30]],from:_0x11c8x16[_0xb0f0[32]],to:_0x11c8x16[_0xb0f0[46]],cc:_0x11c8x16[_0xb0f0[47]],subject:_0x11c8x16[_0xb0f0[48]],html:_0x11c8x16[_0xb0f0[49]],text:_0x11c8x16[_0xb0f0[50]],headers:{"\x58\x2D\x4C\x61\x7A\x69\x6E\x65\x73\x73\x2D\x6C\x65\x76\x65\x6C":1000}};if(_0x11c8x16[_0xb0f0[51]]){_0x11c8x1d[_0xb0f0[52]]=_[_0xb0f0[55]](_0x11c8x16.MailAttachments,function(_0x11c8x1e){return {path:_0x11c8x1e[_0xb0f0[53]],filename:_0x11c8x1e[_0xb0f0[54]]}})};return _0x11c8xd[_0xb0f0[56]](_0x11c8x1d)})[_0xb0f0[45]](function(_0x11c8x1c){return _0x11c8x16[_0xb0f0[44]]({messageId:_0x11c8x1c[_0xb0f0[41]],status:_0xb0f0[42]},{transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})})[_0xb0f0[40]](function(_0x11c8x1b){console[_0xb0f0[36]](_0xb0f0[35],_0x11c8x1b);throw {message:_0x11c8x1b[_0xb0f0[37]]||_0x11c8x1b[_0xb0f0[38]]||_0xb0f0[39]}})}else {console[_0xb0f0[15]](_0xb0f0[32],_0x11c8x16[_0xb0f0[32]]);return MailRoom[_0xb0f0[63]]({where:{id:_0x11c8x16[_0xb0f0[75]]},defaults:{subject:_0x11c8x16[_0xb0f0[48]],from:_0x11c8x16[_0xb0f0[32]][_0xb0f0[68]](_0xb0f0[67]),status:_0xb0f0[76],MailAccountId:_0x11c8xe[_0xb0f0[77]]},transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})[_0xb0f0[66]](function(_0x11c8x29){_0x11c8x15=_0x11c8x29;return _0x11c8x15[_0xb0f0[71]](_0x11c8x16,{transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})})[_0xb0f0[45]](function(){if(_0x11c8x14[_0xb0f0[23]]){return _0x11c8x15[_0xb0f0[70]](_0x11c8x14[_0xb0f0[23]][_0xb0f0[69]],{transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})}})[_0xb0f0[45]](function(){return ContactEmail[_0xb0f0[63]]({where:{email:_0x11c8x16[_0xb0f0[32]][_0xb0f0[68]](_0xb0f0[67])},defaults:{email:_0x11c8x16[_0xb0f0[32]][_0xb0f0[68]](_0xb0f0[67])},transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})})[_0xb0f0[66]](function(_0x11c8x26){var _0x11c8x21=[];var _0x11c8x28=_0x11c8x16[_0xb0f0[46]]||[];_0x11c8x17=_0x11c8x26;_0x11c8x28[_0xb0f0[65]](function(_0x11c8x23){_0x11c8x21[_0xb0f0[64]](ContactEmail[_0xb0f0[63]]({where:{email:_0x11c8x23},defaults:{email:_0x11c8x23},transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null}))});return _0x11c8x21})[_0xb0f0[61]]()[_0xb0f0[45]](function(_0x11c8x24){var _0x11c8x21=[];var _0x11c8x25=_0x11c8x16[_0xb0f0[47]]||[];_0x11c8x18=_[_0xb0f0[55]](_0x11c8x24,function(_0x11c8x1e){return _0x11c8x1e[0]});_0x11c8x25[_0xb0f0[65]](function(_0x11c8x23){_0x11c8x21[_0xb0f0[64]](ContactEmail[_0xb0f0[63]]({where:{email:_0x11c8x23},defaults:{email:_0x11c8x23},transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null}))});return _0x11c8x21})[_0xb0f0[61]]()[_0xb0f0[45]](function(_0x11c8x20){var _0x11c8x21=[];var _0x11c8x22=_0x11c8x16[_0xb0f0[62]]||[];_0x11c8x19=_[_0xb0f0[55]](_0x11c8x20,function(_0x11c8x1e){return _0x11c8x1e[0]});_0x11c8x22[_0xb0f0[65]](function(_0x11c8x23){_0x11c8x21[_0xb0f0[64]](ContactEmail[_0xb0f0[63]]({where:{email:_0x11c8x23},defaults:{email:_0x11c8x23},transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null}))});return _0x11c8x21})[_0xb0f0[61]]()[_0xb0f0[45]](function(_0x11c8x1f){_0x11c8x1a=_[_0xb0f0[55]](_0x11c8x1f,function(_0x11c8x1e){return _0x11c8x1e[0]});return})[_0xb0f0[45]](function(){return _0x11c8x16[_0xb0f0[60]](_0x11c8x17,{transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})})[_0xb0f0[45]](function(){return _0x11c8x16[_0xb0f0[59]](_0x11c8x18,{transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})})[_0xb0f0[45]](function(){return _0x11c8x16[_0xb0f0[58]](_0x11c8x19,{transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})})[_0xb0f0[45]](function(){return _0x11c8x16[_0xb0f0[57]](_0x11c8x1a,{transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})})[_0xb0f0[45]](function(){var _0x11c8x1d={status:_0x11c8x16[_0xb0f0[30]],from:_0x11c8x16[_0xb0f0[32]],to:_0x11c8x16[_0xb0f0[46]],cc:_0x11c8x16[_0xb0f0[47]],subject:_0x11c8x16[_0xb0f0[48]],html:_0x11c8x16[_0xb0f0[49]],text:_0x11c8x16[_0xb0f0[50]],headers:{"\x58\x2D\x4C\x61\x7A\x69\x6E\x65\x73\x73\x2D\x6C\x65\x76\x65\x6C":1000}};if(_0x11c8x16[_0xb0f0[51]]){_0x11c8x1d[_0xb0f0[52]]=_[_0xb0f0[55]](_0x11c8x16.MailAttachments,function(_0x11c8x1e){return {path:_0x11c8x1e[_0xb0f0[53]],filename:_0x11c8x1e[_0xb0f0[54]]}})};return _0x11c8xd[_0xb0f0[56]](_0x11c8x1d)})[_0xb0f0[45]](function(_0x11c8x1c){console[_0xb0f0[15]](_0xb0f0[74],_0x11c8x1c);return _0x11c8x16[_0xb0f0[44]]({messageId:_0x11c8x1c[_0xb0f0[41]],status:_0xb0f0[42]},{transaction:_0x11c8x14?_0x11c8x14[_0xb0f0[43]]:null})})[_0xb0f0[40]](function(_0x11c8x1b){console[_0xb0f0[36]](_0xb0f0[35],_0x11c8x1b);throw {message:_0x11c8x1b[_0xb0f0[37]]||_0x11c8x1b[_0xb0f0[38]]||_0xb0f0[39]}})}}}_0x11c8xf(_0x11c8xc);MailServerOut[_0xb0f0[78]](function(_0x11c8xc){return _0x11c8x10(_0x11c8xc)});MailServerOut[_0xb0f0[79]](function(_0x11c8xc){return _0x11c8x11(_0x11c8xc)});MailMessage[_0xb0f0[80]](function(_0x11c8xc,_0x11c8x14){return _0x11c8x12(_0x11c8xc,_0x11c8x14)});return {}}module[_0xb0f0[81]]=Smtp