Built motion from commit da617fac.|2.6.6
[motion2.git] / server / services / email / lib / utils.js
index ac3c6a7..6d4ad3c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4e28=['_IMG','body','textAsHtml','<a\x20target=\x22_blank\x22\x20','message','originTo','originCc','bcc','attach','type','attachment','format','now','root','server/files/attachments/','writeFileSync','contentType','parser','from','inReplyTo','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','messageId','parseBuffer','first','content','Attachments','Title','Data','gmail','imap.gmail.com','yahoo','imap.mail.yahoo.com','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','split','length','slice','join','pop','isEmpty','test','html','includes','<img','attachments','forEach','push','filename','replace','_SRC'];(function(_0x1da8f5,_0xc052c4){var _0x2973a4=function(_0x260e37){while(--_0x260e37){_0x1da8f5['push'](_0x1da8f5['shift']());}};_0x2973a4(++_0xc052c4);}(_0x4e28,0x6f));var _0x84e2=function(_0x2de547,_0x1d68be){_0x2de547=_0x2de547-0x0;var _0x2dbd80=_0x4e28[_0x2de547];return _0x2dbd80;};'use strict';var _=require(_0x84e2('0x0'));var moment=require(_0x84e2('0x1'));var random=require(_0x84e2('0x2'));var fs=require('fs');var path=require('path');var util=require(_0x84e2('0x3'));var tnef=require(_0x84e2('0x4'));var logger=require(_0x84e2('0x5'))(_0x84e2('0x6'));var config=require(_0x84e2('0x7'));function getAddress(_0x3fa089){var _0x58f5bf=_[_0x84e2('0x8')](_0x3fa089[_0x84e2('0x9')]);return _0x58f5bf&&_0x58f5bf[_0x84e2('0xa')]?_0x58f5bf[_0x84e2('0xa')]:_0x84e2('0xb')+random[_0x84e2('0xc')](0x6)+_0x84e2('0xd');}function getFirstName(_0x535146){var _0x4b1220=_[_0x84e2('0x8')](_0x535146[_0x84e2('0x9')]);if(_0x4b1220&&_0x4b1220[_0x84e2('0xe')]){var _0x3e7458=_0x4b1220[_0x84e2('0xe')][_0x84e2('0xf')](/\s+/);return _0x3e7458[_0x84e2('0x10')]?_0x3e7458[_0x84e2('0x11')](0x0,-0x1)[_0x84e2('0x12')]('\x20'):_0x4b1220[_0x84e2('0xe')];}return'Anonymous';}function getLastName(_0x123eb6){var _0x2dd235=_[_0x84e2('0x8')](_0x123eb6['value']);if(_0x2dd235&&_0x2dd235[_0x84e2('0xe')]){var _0x16cfd1=_0x2dd235['name']['split'](/\s+/);return _0x16cfd1[_0x84e2('0x10')]>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\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/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=/<img.*? _SRC(.*?)[^\>]+>/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'),'<span\x20style=font-weight:bold>\x20[Attachment:\x20'+_0xd8f3ef[_0x253d04]+'\x20]</span>');_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')](/<a\s+/gi,_0x84e2('0x22'));}if(_0x5ecc31['to']){_0x732843[_0x84e2('0x23')][_0x84e2('0x24')]=getMails(null,_0x5ecc31['to']);var _0x578981=getMails(_0x1b17f3[_0x84e2('0x6')],_0x5ecc31['to']);if(!_[_0x84e2('0x14')](_0x578981)){_0x732843['message']['cc']+=_0x578981;}}if(_0x5ecc31['cc']){_0x732843['message'][_0x84e2('0x25')]=getMails(null,_0x5ecc31['cc']);var _0x55ce4f=getMails(_0x1b17f3[_0x84e2('0x6')],_0x5ecc31['cc']);if(!_[_0x84e2('0x14')](_0x55ce4f)){if(!_['isEmpty'](_0x732843[_0x84e2('0x23')]['cc'])){_0x732843['message']['cc']+=',';}_0x732843[_0x84e2('0x23')]['cc']+=_0x55ce4f;}}if(!_[_0x84e2('0x17')](_0x732843[_0x84e2('0x23')][_0x84e2('0x24')],_0x1b17f3[_0x84e2('0x6')])&&!_[_0x84e2('0x17')](_0x732843['message']['originCc'],_0x1b17f3[_0x84e2('0x6')])){_0x732843[_0x84e2('0x23')][_0x84e2('0x26')]=_0x1b17f3[_0x84e2('0x6')];}if(_0x5ecc31[_0x84e2('0x19')]&&_0x5ecc31['attachments']['length']){_0x732843[_0x84e2('0x23')][_0x84e2('0x27')]=_0x5ecc31[_0x84e2('0x19')][_0x84e2('0x10')];for(var _0x39cbb4=0x0,_0x4916cb,_0x2eb389,_0x5adc6e;_0x39cbb4<_0x5ecc31[_0x84e2('0x19')][_0x84e2('0x10')];_0x39cbb4+=0x1){if(_0x5ecc31[_0x84e2('0x19')][_0x39cbb4][_0x84e2('0x28')]===_0x84e2('0x29')){_0x5adc6e=_0x5ecc31[_0x84e2('0x19')][_0x39cbb4][_0x84e2('0x1c')]||'attachment-'+_0x39cbb4;_0x4916cb=util[_0x84e2('0x2a')]('%s-%s',Date[_0x84e2('0x2b')](),_0x5adc6e);_0x2eb389=path[_0x84e2('0x12')](config[_0x84e2('0x2c')],_0x84e2('0x2d'),_0x4916cb);fs[_0x84e2('0x2e')](_0x2eb389,_0x5ecc31['attachments'][_0x39cbb4]['content']);_0x732843['message'][_0x84e2('0x19')][_0x84e2('0x1b')]({'name':_0x5adc6e,'basename':_0x4916cb,'type':_0x5ecc31[_0x84e2('0x19')][_0x39cbb4][_0x84e2('0x2f')],'filepath':_0x2eb389});}}}return _0x732843;}exports[_0x84e2('0x30')]=function(_0x9eb183,_0x1ba697,_0x79b719){var _0x35a0a7={'from':getAddress(_0x1ba697['from']),'firstName':getFirstName(_0x1ba697[_0x84e2('0x31')]),'lastName':getLastName(_0x1ba697['from']),'mapKey':_0x84e2('0x6'),'message':{'from':getMails(_0x9eb183[_0x84e2('0x6')],_0x1ba697['from']),'to':_0x9eb183[_0x84e2('0x6')],'cc':'','subject':_0x1ba697['subject']||'','messageId':_0x1ba697['messageId'],'inReplyTo':_0x1ba697[_0x84e2('0x32')],'sentAt':moment(_0x1ba697['date'])[_0x84e2('0x2a')](_0x84e2('0x33')),'attach':![],'attachments':[]}};if(!_0x1ba697[_0x84e2('0x16')]&&!_0x1ba697[_0x84e2('0x21')]){var _0x2df0b0=_[_0x84e2('0x34')](_0x1ba697[_0x84e2('0x19')],{'contentType':_0x84e2('0x35')});if(_0x2df0b0[_0x84e2('0x10')]){logger[_0x84e2('0x36')](util[_0x84e2('0x2a')](_0x84e2('0x37'),_0x1ba697[_0x84e2('0x38')]));tnef[_0x84e2('0x39')](_[_0x84e2('0x3a')](_0x2df0b0)[_0x84e2('0x3b')],function(_0x5c7916,_0x51fdb2){if(_0x51fdb2){_0x1ba697[_0x84e2('0x16')]=_0x51fdb2['BodyHTML']||'<p>Empty\x20message</p>';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')]='<p>Empty\x20message</p>';_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 _0xb6fd=['line','isAutoreply','parser','from','subject','messageId','inReplyTo','date','YYYY-MM-DD\x20HH:mm:ss','info','Email\x20message\x20%s\x20is\x20in\x20TNEF\x20format:\x20message\x20content\x20will\x20be\x20converted\x20by\x20the\x20system','first','BodyHTML','<p>Empty\x20message</p>','Attachments','Data','user=','auth=Bearer\x20','utf-8','toString','base64','lodash','moment','randomstring','path','util','node-tnef','../../../config/logger','email','head','value','address','generate','@xcally.com','name','substring','indexOf','split','join','length','pop','isEmpty','anonymous','html','replace','includes','<img','forEach','filename','_SRC','<span\x20style=font-weight:bold>\x20[Attachment:\x20','body','textAsHtml','<a\x20target=\x22_blank\x22\x20','message','originCc','originTo','bcc','attachments','type','attachment','attachment-','format','%s-%s','now','root','server/files/attachments/','writeFileSync','content','push','contentType','headerLines','Auto-Submitted:\x20auto-replied','X-Auto-Response-Suppress:\x20All'];(function(_0x20ae13,_0x2a0c8e){var _0x533fd5=function(_0x3bb746){while(--_0x3bb746){_0x20ae13['push'](_0x20ae13['shift']());}};_0x533fd5(++_0x2a0c8e);}(_0xb6fd,0x13d));var _0xdb6f=function(_0x5047a1,_0x1bd26d){_0x5047a1=_0x5047a1-0x0;var _0x51d17b=_0xb6fd[_0x5047a1];return _0x51d17b;};'use strict';var _=require(_0xdb6f('0x0'));var moment=require(_0xdb6f('0x1'));var random=require(_0xdb6f('0x2'));var fs=require('fs');var path=require(_0xdb6f('0x3'));var util=require(_0xdb6f('0x4'));var tnef=require(_0xdb6f('0x5'));var logger=require(_0xdb6f('0x6'))(_0xdb6f('0x7'));var config=require('../../../config/environment');function getAddress(_0x2998a7){var _0x2fab4e=_[_0xdb6f('0x8')](_0x2998a7[_0xdb6f('0x9')]);return _0x2fab4e&&_0x2fab4e[_0xdb6f('0xa')]?_0x2fab4e[_0xdb6f('0xa')]:'anonymous'+random[_0xdb6f('0xb')](0x6)+_0xdb6f('0xc');}function getFirstName(_0x1b02d6){var _0x577f9a=_[_0xdb6f('0x8')](_0x1b02d6['value']);if(_0x577f9a&&_0x577f9a[_0xdb6f('0xd')]){if(_0x577f9a[_0xdb6f('0xd')]==_0x577f9a[_0xdb6f('0xa')]){return _0x577f9a[_0xdb6f('0xd')][_0xdb6f('0xe')](0x0,_0x577f9a[_0xdb6f('0xd')][_0xdb6f('0xf')]('@'));}var _0x5328af=_0x577f9a[_0xdb6f('0xd')][_0xdb6f('0x10')](/\s+/);return _0x5328af['length']>0x1?_0x5328af['slice'](0x0,-0x1)[_0xdb6f('0x11')]('\x20'):_0x577f9a[_0xdb6f('0xd')];}return'Anonymous';}function getLastName(_0x2c7231){var _0x3fd7b0=_[_0xdb6f('0x8')](_0x2c7231[_0xdb6f('0x9')]);if(_0x3fd7b0&&_0x3fd7b0['name']){var _0x1fc3bb=_0x3fd7b0[_0xdb6f('0xd')][_0xdb6f('0x10')](/\s+/);return _0x1fc3bb[_0xdb6f('0x12')]>0x1?_0x1fc3bb[_0xdb6f('0x13')]():'';}return'';}function getMails(_0x261a0a,_0x592506){var _0x3fda97='';for(var _0x2dbf90=0x0;_0x2dbf90<_0x592506[_0xdb6f('0x9')][_0xdb6f('0x12')];_0x2dbf90+=0x1){if(_0x592506[_0xdb6f('0x9')][_0x2dbf90][_0xdb6f('0xa')]!==_0x261a0a){if(!_[_0xdb6f('0x14')](_0x3fda97)){_0x3fda97+=',';}_0x3fda97+=_0x592506[_0xdb6f('0x9')][_0x2dbf90]['name']||_0x592506[_0xdb6f('0x9')][_0x2dbf90][_0xdb6f('0xa')]||'';_0x3fda97+='\x20<';_0x3fda97+=_0x592506[_0xdb6f('0x9')][_0x2dbf90][_0xdb6f('0xa')]?_0x592506[_0xdb6f('0x9')][_0x2dbf90][_0xdb6f('0xa')]:_0xdb6f('0x15')+random[_0xdb6f('0xb')](0x6)+_0xdb6f('0xc');_0x3fda97+='>';}}return _0x3fda97;}function parseEmail(_0x22a7fc,_0x298471,_0x5788eb){if(_0x298471[_0xdb6f('0x16')]){var _0x12c4dc=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;while(_0x12c4dc['test'](_0x298471[_0xdb6f('0x16')])){_0x298471[_0xdb6f('0x16')]=_0x298471['html'][_0xdb6f('0x17')](_0x12c4dc,'');}if(_0x298471[_0xdb6f('0x16')][_0xdb6f('0x18')](_0xdb6f('0x19'))){var _0x1d8b97=[];_0x298471['attachments'][_0xdb6f('0x1a')](_0xbe4641=>{_0x1d8b97['push'](_0xbe4641[_0xdb6f('0x1b')]);});var _0x2e0546=/<img.*? _SRC(.*?)[^>]+>/g;var _0x1f71eb=/src="data:image\/([a-zA-Z]*);base64,([^"]*)"/g;var _0x47d1a6=_0x298471['html'][_0xdb6f('0x17')](_0x1f71eb,_0xdb6f('0x1c'));var _0x53769a=_0x47d1a6[_0xdb6f('0x17')](_0x2e0546,'_IMG');for(let _0x3eaf41=0x0;_0x3eaf41<_0x1d8b97[_0xdb6f('0x12')];_0x3eaf41++){var _0x186c7b=_0x53769a[_0xdb6f('0x17')]('_IMG',_0xdb6f('0x1d')+_0x1d8b97[_0x3eaf41]+'\x20]</span>');_0x53769a=_0x186c7b;}_0x298471['html']=_0x53769a;}_0x5788eb['body']=_0x298471[_0xdb6f('0x16')];}else{_0x5788eb[_0xdb6f('0x1e')]=_0x298471[_0xdb6f('0x1f')];}if(_0x5788eb['body']){_0x5788eb[_0xdb6f('0x1e')]=_0x5788eb[_0xdb6f('0x1e')]['replace'](/<a\s+/gi,_0xdb6f('0x20'));}if(_0x298471['to']){_0x5788eb[_0xdb6f('0x21')]['originTo']=getMails(null,_0x298471['to']);var _0x30fdd2=getMails(_0x22a7fc[_0xdb6f('0x7')],_0x298471['to']);if(!_[_0xdb6f('0x14')](_0x30fdd2)){_0x5788eb[_0xdb6f('0x21')]['cc']+=_0x30fdd2;}}if(_0x298471['cc']){_0x5788eb['message'][_0xdb6f('0x22')]=getMails(null,_0x298471['cc']);var _0x2423b4=getMails(_0x22a7fc[_0xdb6f('0x7')],_0x298471['cc']);if(!_[_0xdb6f('0x14')](_0x2423b4)){if(!_['isEmpty'](_0x5788eb[_0xdb6f('0x21')]['cc'])){_0x5788eb[_0xdb6f('0x21')]['cc']+=',';}_0x5788eb[_0xdb6f('0x21')]['cc']+=_0x2423b4;}}if(!_[_0xdb6f('0x18')](_0x5788eb[_0xdb6f('0x21')][_0xdb6f('0x23')],_0x22a7fc['email'])&&!_[_0xdb6f('0x18')](_0x5788eb['message'][_0xdb6f('0x22')],_0x22a7fc['email'])){_0x5788eb[_0xdb6f('0x21')][_0xdb6f('0x24')]=_0x22a7fc[_0xdb6f('0x7')];}if(_0x298471['attachments']&&_0x298471[_0xdb6f('0x25')][_0xdb6f('0x12')]){_0x5788eb[_0xdb6f('0x21')]['attach']=_0x298471[_0xdb6f('0x25')][_0xdb6f('0x12')];for(var _0x3f0bcc=0x0,_0xfd1b9b,_0x5ea172,_0x43860e;_0x3f0bcc<_0x298471[_0xdb6f('0x25')][_0xdb6f('0x12')];_0x3f0bcc+=0x1){if(_0x298471[_0xdb6f('0x25')][_0x3f0bcc][_0xdb6f('0x26')]===_0xdb6f('0x27')){_0x43860e=_0x298471[_0xdb6f('0x25')][_0x3f0bcc][_0xdb6f('0x1b')]||_0xdb6f('0x28')+_0x3f0bcc;_0xfd1b9b=util[_0xdb6f('0x29')](_0xdb6f('0x2a'),Date[_0xdb6f('0x2b')](),_0x43860e);_0x5ea172=path['join'](config[_0xdb6f('0x2c')],_0xdb6f('0x2d'),_0xfd1b9b);fs[_0xdb6f('0x2e')](_0x5ea172,_0x298471[_0xdb6f('0x25')][_0x3f0bcc][_0xdb6f('0x2f')]);_0x5788eb[_0xdb6f('0x21')][_0xdb6f('0x25')][_0xdb6f('0x30')]({'name':_0x43860e,'basename':_0xfd1b9b,'type':_0x298471[_0xdb6f('0x25')][_0x3f0bcc][_0xdb6f('0x31')],'filepath':_0x5ea172});}}}if(_0x298471[_0xdb6f('0x32')]&&_0x298471[_0xdb6f('0x32')][_0xdb6f('0x12')]>0x0){var _0x5d4c94=[_0xdb6f('0x33'),_0xdb6f('0x34'),'Precedence:\x20auto_reply'];for(var _0x10d1cd=0x0;_0x10d1cd<_0x298471[_0xdb6f('0x32')][_0xdb6f('0x12')];_0x10d1cd++){var _0x4c18f8=_['indexOf'](_0x5d4c94,_0x298471[_0xdb6f('0x32')][_0x10d1cd][_0xdb6f('0x35')]);if(_0x4c18f8>=0x0){_0x5788eb[_0xdb6f('0x36')]=!![];}}}return _0x5788eb;}exports[_0xdb6f('0x37')]=function(_0x2cd9b6,_0x24ea45,_0x2aa1db){var _0xc4bce6={'from':getAddress(_0x24ea45[_0xdb6f('0x38')]),'firstName':getFirstName(_0x24ea45[_0xdb6f('0x38')]),'lastName':getLastName(_0x24ea45[_0xdb6f('0x38')]),'mapKey':_0xdb6f('0x7'),'message':{'from':getMails(_0x2cd9b6[_0xdb6f('0x7')],_0x24ea45[_0xdb6f('0x38')]),'to':_0x2cd9b6['email'],'cc':'','subject':_0x24ea45[_0xdb6f('0x39')]||'','messageId':_0x24ea45[_0xdb6f('0x3a')],'inReplyTo':_0x24ea45[_0xdb6f('0x3b')],'sentAt':moment(_0x24ea45[_0xdb6f('0x3c')])[_0xdb6f('0x29')](_0xdb6f('0x3d')),'attach':![],'attachments':[]}};if(!_0x24ea45[_0xdb6f('0x16')]&&!_0x24ea45[_0xdb6f('0x1f')]){var _0x1da4dd=_['filter'](_0x24ea45[_0xdb6f('0x25')],{'contentType':'application/ms-tnef'});if(_0x1da4dd[_0xdb6f('0x12')]){logger[_0xdb6f('0x3e')](util[_0xdb6f('0x29')](_0xdb6f('0x3f'),_0x24ea45[_0xdb6f('0x3a')]));tnef['parseBuffer'](_[_0xdb6f('0x40')](_0x1da4dd)['content'],function(_0x27599a,_0x369058){if(_0x369058){_0x24ea45[_0xdb6f('0x16')]=_0x369058[_0xdb6f('0x41')]||_0xdb6f('0x42');if(_0x369058[_0xdb6f('0x43')]){for(var _0x38c0f4=0x0;_0x38c0f4<_0x369058['Attachments'][_0xdb6f('0x12')];_0x38c0f4++){var _0x4f82da=_0x369058['Attachments'][_0x38c0f4];_0xc4bce6['message'][_0xdb6f('0x25')][_0xdb6f('0x30')]({'filename':_0x4f82da['Title'],'content':Buffer['from'](_0x4f82da[_0xdb6f('0x44')])});}}}_0x2aa1db(parseEmail(_0x2cd9b6,_0x24ea45,_0xc4bce6));});}else{_0x24ea45[_0xdb6f('0x16')]=_0xdb6f('0x42');_0x2aa1db(parseEmail(_0x2cd9b6,_0x24ea45,_0xc4bce6));}}else{_0x2aa1db(parseEmail(_0x2cd9b6,_0x24ea45,_0xc4bce6));}};exports['generateXOAuth2Token']=function(_0x4d7060,_0x33330b){var _0x3cebef=[_0xdb6f('0x45')+(_0x33330b||''),_0xdb6f('0x46')+_0x4d7060,'',''];return Buffer[_0xdb6f('0x38')](_0x3cebef[_0xdb6f('0x11')]('\ 1'),_0xdb6f('0x47'))[_0xdb6f('0x48')](_0xdb6f('0x49'));};
\ No newline at end of file