X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fservices%2Femail%2Flib%2Futils.js;h=5ff6d8a23d3b2b988332f967e311920a21aa65c0;hb=032eef5eb1c414450ccc959e49effc8ff508851b;hp=f5b6b722a19c7e73bdef588f20dbe09a94029f8d;hpb=9c8616cfa647d703a1bff4c288be65133e777d2a;p=motion2.git diff --git a/server/services/email/lib/utils.js b/server/services/email/lib/utils.js index f5b6b72..5ff6d8a 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 _0xf8e2=['node-tnef','../../../config/logger','email','../../../config/environment','head','address','generate','value','name','split','length','join','Anonymous','pop','anonymous','@xcally.com','html','replace','body','textAsHtml','message','originTo','isEmpty','includes','originCc','bcc','attachments','attach','type','attachment','attachment-','format','%s-%s','now','root','server/files/attachments/','writeFileSync','content','push','parser','from','subject','messageId','inReplyTo','filter','application/ms-tnef','Email\x20message\x20%s\x20is\x20in\x20TNEF\x20format:\x20message\x20content\x20will\x20be\x20converted\x20by\x20the\x20system','parseBuffer','first','BodyHTML','Attachments','Title','Data','
Empty\x20message
','getHost','imap.gmail.com','yahoo','imap-mail.outlook.com','outlook365','127.0.0.1','lodash','moment','randomstring','path','util'];(function(_0x36d01e,_0x3119fe){var _0xd23fba=function(_0x33036e){while(--_0x33036e){_0x36d01e['push'](_0x36d01e['shift']());}};_0xd23fba(++_0x3119fe);}(_0xf8e2,0x181));var _0x2f8e=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0xf8e2[_0x397e5f];return _0x5302b8;};'use strict';var _=require(_0x2f8e('0x0'));var moment=require(_0x2f8e('0x1'));var random=require(_0x2f8e('0x2'));var fs=require('fs');var path=require(_0x2f8e('0x3'));var util=require(_0x2f8e('0x4'));var tnef=require(_0x2f8e('0x5'));var logger=require(_0x2f8e('0x6'))(_0x2f8e('0x7'));var config=require(_0x2f8e('0x8'));function getAddress(_0x1ca06c){var _0x154137=_[_0x2f8e('0x9')](_0x1ca06c['value']);return _0x154137&&_0x154137[_0x2f8e('0xa')]?_0x154137[_0x2f8e('0xa')]:'anonymous'+random[_0x2f8e('0xb')](0x6)+'@xcally.com';}function getFirstName(_0x1b51c7){var _0x224aa9=_['head'](_0x1b51c7[_0x2f8e('0xc')]);if(_0x224aa9&&_0x224aa9[_0x2f8e('0xd')]){var _0x478c4d=_0x224aa9[_0x2f8e('0xd')][_0x2f8e('0xe')](/\s+/);return _0x478c4d[_0x2f8e('0xf')]?_0x478c4d['slice'](0x0,-0x1)[_0x2f8e('0x10')]('\x20'):_0x224aa9[_0x2f8e('0xd')];}return _0x2f8e('0x11');}function getLastName(_0x4a9cb9){var _0x61c25a=_[_0x2f8e('0x9')](_0x4a9cb9[_0x2f8e('0xc')]);if(_0x61c25a&&_0x61c25a[_0x2f8e('0xd')]){var _0x4d93d1=_0x61c25a[_0x2f8e('0xd')]['split'](/\s+/);return _0x4d93d1[_0x2f8e('0xf')]>0x1?_0x4d93d1[_0x2f8e('0x12')]():'';}return'';}function getMails(_0x2d2578,_0x1479f0){var _0x555007='';for(var _0x45a329=0x0;_0x45a329<_0x1479f0['value']['length'];_0x45a329+=0x1){if(_0x1479f0['value'][_0x45a329][_0x2f8e('0xa')]!==_0x2d2578){if(!_['isEmpty'](_0x555007)){_0x555007+=',';}_0x555007+=_0x1479f0[_0x2f8e('0xc')][_0x45a329][_0x2f8e('0xd')]||_0x1479f0[_0x2f8e('0xc')][_0x45a329][_0x2f8e('0xa')]||'';_0x555007+='\x20<';_0x555007+=_0x1479f0[_0x2f8e('0xc')][_0x45a329]['address']?_0x1479f0[_0x2f8e('0xc')][_0x45a329]['address']:_0x2f8e('0x13')+random[_0x2f8e('0xb')](0x6)+_0x2f8e('0x14');_0x555007+='>';}}return _0x555007;}function parseEmail(_0x10c0a9,_0x2b9056,_0x37b7bc){if(_0x2b9056['html']){var _0x4377b7=/