Built motion from commit fa8c70b.|0.0.144
[motion.git] / server / config / routing / sendMail.js
1 var _0xe0f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x61\x70\x70","\x64\x61\x74\x61","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x73\x75\x62\x6A\x65\x63\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x72\x6F\x6F\x6D\x69\x64","\x68\x74\x6D\x6C","\x74\x65\x78\x74","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x2C\x20","\x6A\x6F\x69\x6E","\x66\x72\x6F\x6D","\x74\x6F","\x63\x63","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x72\x65\x6E\x64\x65\x72","\x6D\x65\x73\x73\x61\x67\x65\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6D\x61\x69\x6C","\x63\x68\x61\x6E\x6E\x65\x6C","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x75\x73\x68","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x39","\x67\x65\x74\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x64\x61\x74\x61\x38","\x65\x78\x70\x6F\x72\x74\x73"];_0xe0f0[0];const _=require(_0xe0f0[1]);const config=require(_0xe0f0[2]);const structure=require(_0xe0f0[3]);const cp=require(_0xe0f0[4]);const util=require(_0xe0f0[5]);const moment=require(_0xe0f0[6]);const Mustache=require(_0xe0f0[7]);const User=require(_0xe0f0[9])[_0xe0f0[8]];const Message=require(_0xe0f0[9])[_0xe0f0[10]];const Account=require(_0xe0f0[9])[_0xe0f0[11]];const Template=require(_0xe0f0[9])[_0xe0f0[12]];function SendMail(_0xa5c1xd,_0xa5c1xe,_0xa5c1xf){this[_0xe0f0[13]]= _0xa5c1xd;this[_0xe0f0[14]]= _0xa5c1xe;this[_0xe0f0[15]]= _0xa5c1xf}SendMail[_0xe0f0[17]][_0xe0f0[16]]= function init(){var _0xa5c1x11=this;var _0xa5c1x12;var _0xa5c1x13={from:[],to:[]};return Account[_0xe0f0[36]](_0xa5c1x11[_0xe0f0[13]][_0xe0f0[44]])[_0xe0f0[20]](function(_0xa5c1x17){return _0xa5c1x17[_0xe0f0[43]]()})[_0xe0f0[20]](function(_0xa5c1x16){_0xa5c1x12= _0xa5c1x16;_0xa5c1x13[_0xe0f0[30]][_0xe0f0[40]](_0xa5c1x12[_0xe0f0[39]]);_0xa5c1x13[_0xe0f0[31]][_0xe0f0[40]](_0xa5c1x11[_0xe0f0[13]][_0xe0f0[41]]);return Template[_0xe0f0[36]](_0xa5c1x11[_0xe0f0[13]][_0xe0f0[42]])})[_0xe0f0[20]](function(_0xa5c1x15){switch(_0xa5c1x11[_0xe0f0[14]][_0xe0f0[38]]){case _0xe0f0[37]:_0xa5c1x13[_0xe0f0[22]]= _0xa5c1x15[_0xe0f0[22]];_0xa5c1x13[_0xe0f0[23]]= _0xa5c1x11[_0xe0f0[14]][_0xe0f0[24]];return Message[_0xe0f0[36]](_0xa5c1x11[_0xe0f0[14]][_0xe0f0[35]])[_0xe0f0[20]](function(_0xa5c1xe){_0xa5c1x13[_0xe0f0[25]]= Mustache[_0xe0f0[34]](_0xa5c1x15[_0xe0f0[25]],{interactionId:_0xa5c1x11[_0xe0f0[14]][_0xe0f0[24]],subject:_0xa5c1x11[_0xe0f0[14]][_0xe0f0[22]],body:_0xa5c1xe[_0xe0f0[26]],accountName:_0xa5c1x11[_0xe0f0[14]][_0xe0f0[27]],from:_0xa5c1x13[_0xe0f0[30]][_0xe0f0[29]](_0xe0f0[28]),to:_0xa5c1x13[_0xe0f0[31]][_0xe0f0[29]](_0xe0f0[28]),cc:_0xa5c1x11[_0xe0f0[14]][_0xe0f0[32]][_0xe0f0[29]](_0xe0f0[28]),createdAt:_0xa5c1x11[_0xe0f0[13]][_0xe0f0[33]]})});default:}})[_0xe0f0[20]](function(){return Message[_0xe0f0[21]](_0xa5c1x13)})[_0xe0f0[20]](function(){_0xa5c1x11[_0xe0f0[15]]()})[_0xe0f0[19]](function(_0xa5c1x14){console[_0xe0f0[18]](_0xa5c1x14)})};module[_0xe0f0[45]]= SendMail