X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fservices%2Femail%2Flib%2Futils.js;h=c4e2f39170f0c2512b33bedbefa656c8ff83c25c;hb=7e2a86485d5b091066011cf58fcba785923a5ac5;hp=fca8e810718d53bec99cd73b3e1520e6a9de552e;hpb=de6f27d8824ffb29cbf937050a12378469af9a53;p=motion2.git diff --git a/server/services/email/lib/utils.js b/server/services/email/lib/utils.js index fca8e81..c4e2f39 100644 --- a/server/services/email/lib/utils.js +++ b/server/services/email/lib/utils.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8885=['writeFileSync','content','contentType','parser','from','subject','messageId','date','YYYY-MM-DD\x20HH:mm:ss','filter','application/ms-tnef','info','Email\x20message\x20%s\x20is\x20in\x20TNEF\x20format:\x20message\x20content\x20will\x20be\x20converted\x20by\x20the\x20system','parseBuffer','first','BodyHTML','

Empty\x20message

','Attachments','Data','getHost','gmail','imap.gmail.com','yahoo','imap.mail.yahoo.com','hotmail','imap-mail.outlook.com','outlook365','outlook.office365.com','127.0.0.1','lodash','moment','randomstring','util','node-tnef','../../../config/logger','email','../../../config/environment','head','value','address','anonymous','generate','@xcally.com','name','length','Anonymous','split','pop','isEmpty','html','test','includes','\x20[Attachment:\x20','\x20]','body','textAsHtml','0x1?_0x474c5c[_0x5888('0x12')]():'';}return'';}function getMails(_0x1d1c5f,_0x47c5f8){var _0x250868='';for(var _0x501af1=0x0;_0x501af1<_0x47c5f8[_0x5888('0x9')][_0x5888('0xf')];_0x501af1+=0x1){if(_0x47c5f8[_0x5888('0x9')][_0x501af1][_0x5888('0xa')]!==_0x1d1c5f){if(!_[_0x5888('0x13')](_0x250868)){_0x250868+=',';}_0x250868+=_0x47c5f8[_0x5888('0x9')][_0x501af1][_0x5888('0xe')]||_0x47c5f8[_0x5888('0x9')][_0x501af1][_0x5888('0xa')]||'';_0x250868+='\x20<';_0x250868+=_0x47c5f8[_0x5888('0x9')][_0x501af1]['address']?_0x47c5f8[_0x5888('0x9')][_0x501af1][_0x5888('0xa')]:_0x5888('0xb')+random[_0x5888('0xc')](0x6)+_0x5888('0xd');_0x250868+='>';}}return _0x250868;}function parseEmail(_0x419778,_0x2c2d19,_0xa69166){if(_0x2c2d19[_0x5888('0x14')]){var _0x1e6e0d=/)<[^<]*)*<\/script>/gi;while(_0x1e6e0d[_0x5888('0x15')](_0x2c2d19['html'])){_0x2c2d19[_0x5888('0x14')]=_0x2c2d19['html']['replace'](_0x1e6e0d,'');}if(_0x2c2d19['html'][_0x5888('0x16')](_0x5888('0x17'))){var _0x15bd8a=[];_0x2c2d19[_0x5888('0x18')][_0x5888('0x19')](_0x250b0a=>{_0x15bd8a[_0x5888('0x1a')](_0x250b0a[_0x5888('0x1b')]);});var _0x14d2a3=/]+>/g;var _0x42307a=/src=\"data:image\/([a-zA-Z]*);base64,([^\"]*)\"/g;var _0x5340d3=_0x2c2d19[_0x5888('0x14')][_0x5888('0x1c')](_0x42307a,_0x5888('0x1d'));var _0x46abc1=_0x5340d3[_0x5888('0x1c')](_0x14d2a3,_0x5888('0x1e'));for(let _0xe739d3=0x0;_0xe739d3<_0x15bd8a[_0x5888('0xf')];_0xe739d3++){var _0x19d40a=_0x46abc1['replace'](_0x5888('0x1e'),_0x5888('0x1f')+_0x15bd8a[_0xe739d3]+_0x5888('0x20'));_0x46abc1=_0x19d40a;}_0x2c2d19['html']=_0x46abc1;}_0xa69166['body']=_0x2c2d19[_0x5888('0x14')];}else{_0xa69166[_0x5888('0x21')]=_0x2c2d19[_0x5888('0x22')];}if(_0xa69166['body']){_0xa69166[_0x5888('0x21')]=_0xa69166[_0x5888('0x21')][_0x5888('0x1c')](/\x20[Attachment:\x20','body','message','originTo','bcc','attach','attachment','attachment-','format','now','join','root','server/files/attachments/','writeFileSync','content','contentType','from','subject','messageId','inReplyTo','date','YYYY-MM-DD\x20HH:mm:ss','textAsHtml','info','Email\x20message\x20%s\x20is\x20in\x20TNEF\x20format:\x20message\x20content\x20will\x20be\x20converted\x20by\x20the\x20system','parseBuffer','first','BodyHTML','

Empty\x20message

','Attachments','Title','Data','getHost','gmail','imap.gmail.com','yahoo','imap.mail.yahoo.com','hotmail','imap-mail.outlook.com','127.0.0.1','lodash','moment','randomstring','path','util','node-tnef','../../../config/logger','email','../../../config/environment','head','value','address','anonymous','split','length','slice','name','pop','isEmpty','html','test','replace','includes','0x1?_0x2058c3[_0x8778('0x11')]():'';}return'';}function getMails(_0x4e655f,_0x44a709){var _0x45e368='';for(var _0x2bc171=0x0;_0x2bc171<_0x44a709[_0x8778('0xa')]['length'];_0x2bc171+=0x1){if(_0x44a709[_0x8778('0xa')][_0x2bc171][_0x8778('0xb')]!==_0x4e655f){if(!_[_0x8778('0x12')](_0x45e368)){_0x45e368+=',';}_0x45e368+=_0x44a709[_0x8778('0xa')][_0x2bc171][_0x8778('0x10')]||_0x44a709[_0x8778('0xa')][_0x2bc171]['address']||'';_0x45e368+='\x20<';_0x45e368+=_0x44a709['value'][_0x2bc171][_0x8778('0xb')]?_0x44a709[_0x8778('0xa')][_0x2bc171][_0x8778('0xb')]:_0x8778('0xc')+random['generate'](0x6)+'@xcally.com';_0x45e368+='>';}}return _0x45e368;}function parseEmail(_0x51e3e3,_0xc7000f,_0xd040ac){if(_0xc7000f[_0x8778('0x13')]){var _0x1d9c90=/)<[^<]*)*<\/script>/gi;while(_0x1d9c90[_0x8778('0x14')](_0xc7000f[_0x8778('0x13')])){_0xc7000f[_0x8778('0x13')]=_0xc7000f[_0x8778('0x13')][_0x8778('0x15')](_0x1d9c90,'');}if(_0xc7000f[_0x8778('0x13')][_0x8778('0x16')](_0x8778('0x17'))){var _0x9e67cf=[];_0xc7000f[_0x8778('0x18')][_0x8778('0x19')](_0x538c59=>{_0x9e67cf[_0x8778('0x1a')](_0x538c59[_0x8778('0x1b')]);});var _0x455a32=/]+>/g;var _0x1ea795=/src=\"data:image\/([a-zA-Z]*);base64,([^\"]*)\"/g;var _0x388209=_0xc7000f['html'][_0x8778('0x15')](_0x1ea795,'_SRC');var _0x80088c=_0x388209[_0x8778('0x15')](_0x455a32,_0x8778('0x1c'));for(let _0x4f3cab=0x0;_0x4f3cab<_0x9e67cf[_0x8778('0xe')];_0x4f3cab++){var _0x277c0c=_0x80088c[_0x8778('0x15')]('_IMG',_0x8778('0x1d')+_0x9e67cf[_0x4f3cab]+'\x20]');_0x80088c=_0x277c0c;}_0xc7000f[_0x8778('0x13')]=_0x80088c;}_0xd040ac[_0x8778('0x1e')]=_0xc7000f[_0x8778('0x13')];}else{_0xd040ac[_0x8778('0x1e')]=_0xc7000f['textAsHtml'];}if(_0xd040ac[_0x8778('0x1e')]){_0xd040ac['body']=_0xd040ac['body'][_0x8778('0x15')](/