X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fservices%2Femail%2Flib%2Futils.js;h=2b625b7c12dbc66f8469ae658de71bdbb73da44d;hb=6154c6759c55056c3b23ea2e885ab9e551bbdf0c;hp=ac3c6a746612f3614ebd6eb708aa173398fc2cc2;hpb=180439628549c979093908f0b833833689fb8374;p=motion2.git diff --git a/server/services/email/lib/utils.js b/server/services/email/lib/utils.js index ac3c6a7..2b625b7 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 _0x4e28=['_IMG','body','textAsHtml','0x1?_0x16cfd1[_0x84e2('0x13')]():'';}return'';}function getMails(_0xa18fc6,_0x50bea3){var _0xa840a8='';for(var _0x189f38=0x0;_0x189f38<_0x50bea3[_0x84e2('0x9')]['length'];_0x189f38+=0x1){if(_0x50bea3[_0x84e2('0x9')][_0x189f38][_0x84e2('0xa')]!==_0xa18fc6){if(!_[_0x84e2('0x14')](_0xa840a8)){_0xa840a8+=',';}_0xa840a8+=_0x50bea3[_0x84e2('0x9')][_0x189f38][_0x84e2('0xe')]||_0x50bea3[_0x84e2('0x9')][_0x189f38][_0x84e2('0xa')]||'';_0xa840a8+='\x20<';_0xa840a8+=_0x50bea3[_0x84e2('0x9')][_0x189f38][_0x84e2('0xa')]?_0x50bea3[_0x84e2('0x9')][_0x189f38][_0x84e2('0xa')]:_0x84e2('0xb')+random[_0x84e2('0xc')](0x6)+'@xcally.com';_0xa840a8+='>';}}return _0xa840a8;}function parseEmail(_0x1b17f3,_0x5ecc31,_0x732843){if(_0x5ecc31['html']){var _0x16e307=/)<[^<]*)*<\/script>/gi;while(_0x16e307[_0x84e2('0x15')](_0x5ecc31[_0x84e2('0x16')])){_0x5ecc31[_0x84e2('0x16')]=_0x5ecc31[_0x84e2('0x16')]['replace'](_0x16e307,'');}if(_0x5ecc31[_0x84e2('0x16')][_0x84e2('0x17')](_0x84e2('0x18'))){var _0xd8f3ef=[];_0x5ecc31[_0x84e2('0x19')][_0x84e2('0x1a')](_0x52cb93=>{_0xd8f3ef[_0x84e2('0x1b')](_0x52cb93[_0x84e2('0x1c')]);});var _0xa83103=/]+>/g;var _0x1214a0=/src=\"data:image\/([a-zA-Z]*);base64,([^\"]*)\"/g;var _0x5a57aa=_0x5ecc31['html'][_0x84e2('0x1d')](_0x1214a0,_0x84e2('0x1e'));var _0x29df65=_0x5a57aa[_0x84e2('0x1d')](_0xa83103,_0x84e2('0x1f'));for(let _0x253d04=0x0;_0x253d04<_0xd8f3ef[_0x84e2('0x10')];_0x253d04++){var _0x5931ec=_0x29df65[_0x84e2('0x1d')](_0x84e2('0x1f'),'\x20[Attachment:\x20'+_0xd8f3ef[_0x253d04]+'\x20]');_0x29df65=_0x5931ec;}_0x5ecc31[_0x84e2('0x16')]=_0x29df65;}_0x732843[_0x84e2('0x20')]=_0x5ecc31[_0x84e2('0x16')];}else{_0x732843[_0x84e2('0x20')]=_0x5ecc31[_0x84e2('0x21')];}if(_0x732843['body']){_0x732843[_0x84e2('0x20')]=_0x732843[_0x84e2('0x20')][_0x84e2('0x1d')](/Empty\x20message

';if(_0x51fdb2['Attachments']){for(var _0x3ee377=0x0;_0x3ee377<_0x51fdb2[_0x84e2('0x3c')][_0x84e2('0x10')];_0x3ee377++){var _0x12bc6a=_0x51fdb2[_0x84e2('0x3c')][_0x3ee377];_0x35a0a7[_0x84e2('0x23')]['attachments'][_0x84e2('0x1b')]({'filename':_0x12bc6a[_0x84e2('0x3d')],'content':new Buffer(_0x12bc6a[_0x84e2('0x3e')])});}}}_0x79b719(parseEmail(_0x9eb183,_0x1ba697,_0x35a0a7));});}else{_0x1ba697[_0x84e2('0x16')]='

Empty\x20message

';_0x79b719(parseEmail(_0x9eb183,_0x1ba697,_0x35a0a7));}}else{_0x79b719(parseEmail(_0x9eb183,_0x1ba697,_0x35a0a7));}};exports['getHost']=function(_0x278e9a){switch(_0x278e9a){case _0x84e2('0x3f'):return _0x84e2('0x40');case _0x84e2('0x41'):return _0x84e2('0x42');case'hotmail':return _0x84e2('0x43');case _0x84e2('0x44'):return _0x84e2('0x45');}return _0x84e2('0x46');}; \ No newline at end of file +var _0xe3a4=['now','root','server/files/attachments/','writeFileSync','from','subject','inReplyTo','date','YYYY-MM-DD\x20HH:mm:ss','filter','application/ms-tnef','Email\x20message\x20%s\x20is\x20in\x20TNEF\x20format:\x20message\x20content\x20will\x20be\x20converted\x20by\x20the\x20system','messageId','parseBuffer','content','

Empty\x20message

','Attachments','Title','Data','getHost','gmail','imap.gmail.com','yahoo','imap.mail.yahoo.com','imap-mail.outlook.com','outlook365','outlook.office365.com','lodash','moment','randomstring','path','util','node-tnef','email','head','address','generate','@xcally.com','value','name','split','length','slice','join','Anonymous','isEmpty','anonymous','html','test','includes','attachments','forEach','push','filename','replace','_SRC','_IMG','\x20[Attachment:\x20','\x20]','body','textAsHtml','0x1?_0x3c8ad8['pop']():'';}return'';}function getMails(_0x5cb0e6,_0x3506e9){var _0x1065bb='';for(var _0x5b361e=0x0;_0x5b361e<_0x3506e9[_0x4e3a('0xb')][_0x4e3a('0xe')];_0x5b361e+=0x1){if(_0x3506e9[_0x4e3a('0xb')][_0x5b361e]['address']!==_0x5cb0e6){if(!_[_0x4e3a('0x12')](_0x1065bb)){_0x1065bb+=',';}_0x1065bb+=_0x3506e9[_0x4e3a('0xb')][_0x5b361e][_0x4e3a('0xc')]||_0x3506e9[_0x4e3a('0xb')][_0x5b361e][_0x4e3a('0x8')]||'';_0x1065bb+='\x20<';_0x1065bb+=_0x3506e9[_0x4e3a('0xb')][_0x5b361e][_0x4e3a('0x8')]?_0x3506e9[_0x4e3a('0xb')][_0x5b361e][_0x4e3a('0x8')]:_0x4e3a('0x13')+random[_0x4e3a('0x9')](0x6)+_0x4e3a('0xa');_0x1065bb+='>';}}return _0x1065bb;}function parseEmail(_0x1e7e83,_0x2d00ae,_0x4e7285){if(_0x2d00ae[_0x4e3a('0x14')]){var _0x249868=/)<[^<]*)*<\/script>/gi;while(_0x249868[_0x4e3a('0x15')](_0x2d00ae[_0x4e3a('0x14')])){_0x2d00ae[_0x4e3a('0x14')]=_0x2d00ae['html']['replace'](_0x249868,'');}if(_0x2d00ae[_0x4e3a('0x14')][_0x4e3a('0x16')]('{_0x2455e2[_0x4e3a('0x19')](_0x398a23[_0x4e3a('0x1a')]);});var _0x205206=/]+>/g;var _0x3b6d71=/src=\"data:image\/([a-zA-Z]*);base64,([^\"]*)\"/g;var _0x5c5ae1=_0x2d00ae[_0x4e3a('0x14')][_0x4e3a('0x1b')](_0x3b6d71,_0x4e3a('0x1c'));var _0x1bcb0c=_0x5c5ae1['replace'](_0x205206,_0x4e3a('0x1d'));for(let _0x3218dd=0x0;_0x3218dd<_0x2455e2[_0x4e3a('0xe')];_0x3218dd++){var _0x15673f=_0x1bcb0c[_0x4e3a('0x1b')](_0x4e3a('0x1d'),_0x4e3a('0x1e')+_0x2455e2[_0x3218dd]+_0x4e3a('0x1f'));_0x1bcb0c=_0x15673f;}_0x2d00ae[_0x4e3a('0x14')]=_0x1bcb0c;}_0x4e7285[_0x4e3a('0x20')]=_0x2d00ae[_0x4e3a('0x14')];}else{_0x4e7285['body']=_0x2d00ae[_0x4e3a('0x21')];}if(_0x4e7285['body']){_0x4e7285[_0x4e3a('0x20')]=_0x4e7285[_0x4e3a('0x20')][_0x4e3a('0x1b')](/