Built motion from commit 2a5451a.|1.0.18
[motion.git] / server / config / triggers / mail.js
1 var _0xe034=["\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x75\x73\x74\x61\x63\x68\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x54\x72\x69\x67\x67\x65\x72\x20\x4D\x61\x69\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x74\x61\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x3B","\x73\x70\x6C\x69\x74","\x64\x61\x74\x61\x31","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x75\x70\x64\x61\x74\x65","\x65\x6D\x61\x69\x6C","\x64\x61\x74\x61\x33","\x73\x75\x62\x6A\x65\x63\x74","\x62\x6F\x64\x79","\x64\x61\x74\x61\x34","\x68\x74\x6D\x6C","\x74\x65\x78\x74","\x72\x65\x6E\x64\x65\x72","\x3C\x62\x72\x3E","\x72\x65\x70\x6C\x61\x63\x65","\x26\x23\x30\x33\x39\x3B","\x26\x71\x75\x6F\x74\x3B","\x26\x67\x74\x3B","\x26\x6C\x74\x3B","\x26\x61\x6D\x70\x3B","\x61\x64\x64\x72\x65\x73\x73","\x64\x61\x74\x61\x32","\x53\x45\x4E\x44\x49\x4E\x47","\x69\x64","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x73\x65\x6E\x64","\x74\x68\x65\x6E","\x64\x61\x74\x61\x35","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74\x45\x6D\x61\x69\x6C","\x64\x61\x74\x61\x36","\x66\x6F\x72\x77\x61\x72\x64","\x66\x72\x6F\x6D\x49\x64","\x74\x65\x6D\x70\x6C\x61\x74\x65","\x61\x63\x63\x6F\x75\x6E\x74\x54\x65\x6D\x70\x6C\x61\x74\x65","\x63\x6C\x6F\x73\x65","\x43\x4C\x4F\x53\x45\x44","\x65\x78\x70\x6F\x72\x74\x73"];const _=require(_0xe034[0]);const rp=require(_0xe034[1]);const Mustache=require(_0xe034[2]);const MailRoom=require(_0xe034[4])[_0xe034[3]];const Template=require(_0xe034[4])[_0xe034[5]];const MailMessage=require(_0xe034[4])[_0xe034[6]];const MailAccount=require(_0xe034[4])[_0xe034[7]];const MailServerOut=require(_0xe034[4])[_0xe034[8]];function Mail(){console[_0xe034[10]](_0xe034[9])}Mail[_0xe034[12]][_0xe034[11]]= function(_0x11c9xa,_0x11c9xb,_0x11c9xc,_0x11c9xd){return MailRoom[_0xe034[19]]({tags:_0x11c9xa[_0xe034[17]][_0xe034[16]](_0xe034[15])},{where:{id:_0x11c9xb[_0xe034[18]]}})[_0xe034[14]](function(_0x11c9xe){console[_0xe034[13]](_0x11c9xe)})};Mail[_0xe034[12]][_0xe034[20]]= function(_0x11c9xa,_0x11c9xb){var _0x11c9xf;return MailAccount[_0xe034[44]](_0x11c9xb[_0xe034[45]])[_0xe034[42]](function(_0x11c9x13){_0x11c9xf= _0x11c9x13;if(_0x11c9xa[_0xe034[43]]){return Template[_0xe034[44]](_0x11c9xa[_0xe034[43]])}})[_0xe034[42]](function(_0x11c9x10){var _0x11c9x11;if(_0x11c9x10){_0x11c9xa[_0xe034[21]]= _0x11c9x10[_0xe034[22]];_0x11c9xb[_0xe034[23]]= _0x11c9xa[_0xe034[24]]|| _0x11c9xb[_0xe034[25]]|| _0x11c9xb[_0xe034[26]];_0x11c9x11= _0x11c9x10[_0xe034[25]]?Mustache[_0xe034[27]](_0x11c9x10[_0xe034[25]],_0x11c9xb):null}else {_0x11c9x11= _0x11c9xa[_0xe034[24]]?Mustache[_0xe034[27]](_0x11c9xa[_0xe034[24]],_0x11c9xb)[_0xe034[29]](/&/g,_0xe034[34])[_0xe034[29]](/</g,_0xe034[33])[_0xe034[29]](/>/g,_0xe034[32])[_0xe034[29]](/"/g,_0xe034[31])[_0xe034[29]](/'/g,_0xe034[30])[_0xe034[29]](/\n/g,_0xe034[28]):null};var _0x11c9x12={subject:_0x11c9xa[_0xe034[21]]|| null,from:[_0x11c9xf[_0xe034[35]]],to:_0x11c9xa[_0xe034[17]][_0xe034[16]](_0xe034[15]),cc:_0x11c9xa[_0xe034[36]]?_0x11c9xa[_0xe034[36]][_0xe034[16]](_0xe034[15]):[],html:_0x11c9x11,status:_0xe034[37],auto:true,accountId:_0x11c9xf[_0xe034[38]],accountName:_0x11c9xf[_0xe034[39]]};process[_0xe034[41]]({message:_0xe034[40],doc:_0x11c9x12})})[_0xe034[14]](function(_0x11c9xe){console[_0xe034[13]](_0x11c9xe)})};Mail[_0xe034[12]][_0xe034[46]]= function(_0x11c9xa,_0x11c9xb){var _0x11c9xf;return MailAccount[_0xe034[44]](_0x11c9xa[_0xe034[17]])[_0xe034[42]](function(_0x11c9x13){_0x11c9xf= _0x11c9x13;if(_0x11c9xa[_0xe034[47]]){return Template[_0xe034[44]](_0x11c9xa[_0xe034[47]])}})[_0xe034[42]](function(_0x11c9x10){var _0x11c9x11;if(_0x11c9x10){_0x11c9xa[_0xe034[24]]= _0x11c9x10[_0xe034[22]];_0x11c9xb[_0xe034[23]]= _0x11c9xa[_0xe034[43]]|| _0x11c9xb[_0xe034[25]]|| _0x11c9xb[_0xe034[26]];_0x11c9x11= _0x11c9x10[_0xe034[25]]?Mustache[_0xe034[27]](_0x11c9x10[_0xe034[25]],_0x11c9xb):null}else {_0x11c9x11= _0x11c9xa[_0xe034[43]]?Mustache[_0xe034[27]](_0x11c9xa[_0xe034[43]],_0x11c9xb)[_0xe034[29]](/&/g,_0xe034[34])[_0xe034[29]](/</g,_0xe034[33])[_0xe034[29]](/>/g,_0xe034[32])[_0xe034[29]](/"/g,_0xe034[31])[_0xe034[29]](/'/g,_0xe034[30])[_0xe034[29]](/\n/g,_0xe034[28]):null};var _0x11c9x12={subject:_0x11c9xa[_0xe034[24]]|| null,from:[_0x11c9xf[_0xe034[35]]],to:_0x11c9xa[_0xe034[36]][_0xe034[16]](_0xe034[15]),cc:_0x11c9xa[_0xe034[21]]?_0x11c9xa[_0xe034[21]][_0xe034[16]](_0xe034[15]):[],html:_0x11c9x11,status:_0xe034[37],auto:true,accountId:_0x11c9xf[_0xe034[38]],accountName:_0x11c9xf[_0xe034[39]]};process[_0xe034[41]]({message:_0xe034[40],doc:_0x11c9x12})})[_0xe034[14]](function(_0x11c9xe){console[_0xe034[13]](_0x11c9xe)})};Mail[_0xe034[12]][_0xe034[48]]= function(_0x11c9xa,_0x11c9xb){return MailAccount[_0xe034[44]](_0x11c9xb[_0xe034[45]])[_0xe034[42]](function(_0x11c9x13){var _0x11c9x12={subject:_0x11c9xb[_0xe034[22]]|| null,from:[_0x11c9x13[_0xe034[35]]],fromId:_0x11c9xb[_0xe034[49]],to:_0x11c9xa[_0xe034[17]][_0xe034[16]](_0xe034[15]),text:_0x11c9xb[_0xe034[26]][_0xe034[29]](/&/g,_0xe034[34])[_0xe034[29]](/</g,_0xe034[33])[_0xe034[29]](/>/g,_0xe034[32])[_0xe034[29]](/"/g,_0xe034[31])[_0xe034[29]](/'/g,_0xe034[30])[_0xe034[29]](/\n/g,_0xe034[28]),html:_0x11c9xb[_0xe034[25]]|| _0x11c9xb[_0xe034[26]],status:_0xe034[37],auto:true,accountId:_0x11c9x13[_0xe034[38]],accountName:_0x11c9x13[_0xe034[39]]};process[_0xe034[41]]({message:_0xe034[40],doc:_0x11c9x12})})[_0xe034[14]](function(_0x11c9xe){console[_0xe034[13]](_0x11c9xe)})};Mail[_0xe034[12]][_0xe034[50]]= function(_0x11c9xa,_0x11c9xb){var _0x11c9xf;return MailAccount[_0xe034[44]](_0x11c9xb[_0xe034[45]])[_0xe034[42]](function(_0x11c9x13){_0x11c9xf= _0x11c9x13;return Template[_0xe034[44]](_0x11c9xa[_0xe034[17]])})[_0xe034[42]](function(_0x11c9x10){_0x11c9xb[_0xe034[23]]= _0x11c9xb[_0xe034[25]]|| _0x11c9xb[_0xe034[26]];var _0x11c9x12={status:_0xe034[37],subject:_0x11c9x10[_0xe034[22]],from:[_0x11c9xf[_0xe034[35]]],to:_0x11c9xa[_0xe034[36]][_0xe034[16]](_0xe034[15]),html:_0x11c9x10[_0xe034[25]]?Mustache[_0xe034[27]](_0x11c9x10[_0xe034[25]],_0x11c9xb):null,auto:true,accountId:_0x11c9xf[_0xe034[38]],accountName:_0x11c9xf[_0xe034[39]]};process[_0xe034[41]]({message:_0xe034[40],doc:_0x11c9x12})})[_0xe034[14]](function(_0x11c9xe){console[_0xe034[10]](_0x11c9xe)})};Mail[_0xe034[12]][_0xe034[51]]= function(_0x11c9xa,_0x11c9xb){var _0x11c9xf;return MailAccount[_0xe034[44]](_0x11c9xa[_0xe034[17]])[_0xe034[42]](function(_0x11c9x13){_0x11c9xf= _0x11c9x13;return Template[_0xe034[44]](_0x11c9xa[_0xe034[36]])})[_0xe034[42]](function(_0x11c9x10){var _0x11c9x12={status:_0xe034[37],subject:_0x11c9x10[_0xe034[22]],from:[_0x11c9xf[_0xe034[35]]],to:_0x11c9xa[_0xe034[21]][_0xe034[16]](_0xe034[15]),html:_0x11c9x10[_0xe034[25]]?Mustache[_0xe034[27]](_0x11c9x10[_0xe034[25]],_0x11c9xb):null,auto:true,accountId:_0x11c9xf[_0xe034[38]],accountName:_0x11c9xf[_0xe034[39]]};process[_0xe034[41]]({message:_0xe034[40],doc:_0x11c9x12})})[_0xe034[14]](function(_0x11c9xe){console[_0xe034[10]](_0x11c9xe)})};Mail[_0xe034[12]][_0xe034[52]]= function(_0x11c9xa,_0x11c9xb){return MailRoom[_0xe034[19]]({status:_0xe034[53],disposition:_0x11c9xa[_0xe034[17]]|| null},{individualHooks:true,where:{id:_0x11c9xb[_0xe034[18]]}})[_0xe034[14]](function(_0x11c9xe){console[_0xe034[13]](_0x11c9xe)})};module[_0xe034[54]]= Mail