Built motion from commit d1901dcc5.|1.0.22.1
[motion.git] / server / config / forked_routing / fax / sendmail.js
1 var _0xbdc8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73\x2D\x65\x78\x74\x72\x61","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x6D\x75\x73\x74\x61\x63\x68\x65","\x66\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\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\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x70\x64\x66","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6E\x62\x6F\x75\x6E\x64","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x6A\x6F\x69\x6E","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x63\x6F\x70\x79\x53\x79\x6E\x63","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x66\x61\x78\x20\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x21","\x65\x72\x72\x6F\x72","\x67\x65\x74\x46\x69\x6C\x65\x53\x69\x7A\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x70\x64\x66","\x65\x78\x70\x6F\x72\x74\x73","\x66\x69\x6E\x61\x6C\x6C\x79","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x50\x50\x20\x53\x45\x4E\x44\x4D\x41\x49\x4C\x2C\x20\x41\x43\x43\x4F\x55\x4E\x54\x3A","\x64\x61\x74\x61\x38","\x54\x45\x4D\x50\x4C\x41\x54\x45\x3A","\x64\x61\x74\x61\x39","\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x45\x52\x52\x4F\x52","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x69\x6E\x66\x6F","\x63\x72\x65\x61\x74\x65\x4D\x61\x69\x6C","\x73\x65\x6E\x64","\x74\x68\x65\x6E","\x73\x75\x62\x6A\x65\x63\x74","\x68\x74\x6D\x6C","\x72\x6F\x6F\x6D\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x2C\x20","\x66\x72\x6F\x6D","\x74\x6F","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x72\x65\x6E\x64\x65\x72","\x64\x61\x74\x61\x36","\x79\x65\x73","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x70\x61\x72\x73\x65","\x61\x64\x64\x72\x65\x73\x73","\x70\x75\x73\x68","\x64\x61\x74\x61\x32","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0xbdc8[0];var fs=require(_0xbdc8[1]);var util=require(_0xbdc8[2]);var path=require(_0xbdc8[3]);var Mustache=require(_0xbdc8[4]);var logger=require(_0xbdc8[6])(_0xbdc8[5]);var MyUtil=require(_0xbdc8[7]);var Account=require(_0xbdc8[9])[_0xbdc8[8]];var Template=require(_0xbdc8[9])[_0xbdc8[10]];var Message=require(_0xbdc8[9])[_0xbdc8[11]];var Attachment=require(_0xbdc8[9])[_0xbdc8[12]];var config=require(_0xbdc8[13]);function getAttachment(_0x9bd4xd){var _0x9bd4xe=_0x9bd4xd+ _0xbdc8[14];var _0x9bd4xf=path[_0xbdc8[20]](config[_0xbdc8[15]],_0xbdc8[16],_0xbdc8[17],_0xbdc8[5],_0xbdc8[18],_0xbdc8[19],_0x9bd4xe);var _0x9bd4x10=path[_0xbdc8[20]](config[_0xbdc8[15]],_0xbdc8[16],_0xbdc8[17],_0xbdc8[21]);try{fs[_0xbdc8[22]](_0x9bd4xf,path[_0xbdc8[20]](_0x9bd4x10,_0x9bd4xe))}catch(err){logger[_0xbdc8[24]](_0xbdc8[23],err);return null};return {size:MyUtil[_0xbdc8[25]](_0x9bd4xf),path:path[_0xbdc8[20]](_0x9bd4x10,_0x9bd4xe),name:_0x9bd4xe,type:_0xbdc8[26],basename:_0x9bd4xd}}module[_0xbdc8[27]]= function(_0x9bd4x11,_0x9bd4x12,_0x9bd4x13,_0x9bd4x14,_0x9bd4x15){var _0x9bd4x16={from:[],to:[],auto:true};return Account[_0xbdc8[62]](_0x9bd4x11[_0xbdc8[32]])[_0xbdc8[43]](function(_0x9bd4x19){_0x9bd4x16[_0xbdc8[49]][_0xbdc8[60]](_0x9bd4x19[_0xbdc8[59]]);_0x9bd4x16[_0xbdc8[50]][_0xbdc8[60]](_0x9bd4x11[_0xbdc8[61]]);return Template[_0xbdc8[62]](_0x9bd4x11[_0xbdc8[34]])})[_0xbdc8[43]](function(_0x9bd4x18){_0x9bd4x16[_0xbdc8[44]]= _0x9bd4x18[_0xbdc8[44]];_0x9bd4x16[_0xbdc8[45]]= Mustache[_0xbdc8[52]](_0x9bd4x18[_0xbdc8[45]],{interactionId:_0x9bd4x12[_0xbdc8[46]],subject:_0x9bd4x18[_0xbdc8[44]],accountName:_0x9bd4x12[_0xbdc8[47]],from:_0x9bd4x16[_0xbdc8[49]][_0xbdc8[20]](_0xbdc8[48]),to:_0x9bd4x16[_0xbdc8[50]][_0xbdc8[20]](_0xbdc8[48]),createdAt:_0x9bd4x11[_0xbdc8[51]]});if(_0x9bd4x11[_0xbdc8[53]]=== _0xbdc8[54]){_0x9bd4x16[_0xbdc8[55]]= [getAttachment(path[_0xbdc8[58]](_0x9bd4x13[_0xbdc8[57]])[_0xbdc8[56]])]}})[_0xbdc8[43]](function(){logger[_0xbdc8[40]](_0x9bd4x12[_0xbdc8[30]][_0xbdc8[29]](),_0xbdc8[31],_0x9bd4x11[_0xbdc8[32]],_0xbdc8[33],_0x9bd4x11[_0xbdc8[34]],_0xbdc8[35],_0x9bd4x12[_0xbdc8[36]]);process[_0xbdc8[42]]({type:_0xbdc8[41],msg:_0x9bd4x16})})[_0xbdc8[39]](function(_0x9bd4x17){logger[_0xbdc8[24]](_0x9bd4x12[_0xbdc8[30]][_0xbdc8[29]](),_0xbdc8[31],_0x9bd4x11[_0xbdc8[32]],_0xbdc8[33],_0x9bd4x11[_0xbdc8[34]],_0xbdc8[35],_0x9bd4x12[_0xbdc8[36]],_0xbdc8[37]);logger[_0xbdc8[24]](_0x9bd4x17[_0xbdc8[38]])})[_0xbdc8[28]](function(){_0x9bd4x15()})}