Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / services / email / index.js
index 4944e09..1a7d23b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x06bc=['log','./server','./rpc/setting','resolve','getMailAccounts','then','initMailAccounts','mailAccounts','loginMailFrequency','catch'];(function(_0x10624c,_0x1f77ce){var _0x1c7ad8=function(_0x2092d3){while(--_0x2092d3){_0x10624c['push'](_0x10624c['shift']());}};_0x1c7ad8(++_0x1f77ce);}(_0x06bc,0x6f));var _0xc06b=function(_0x330bfb,_0x31586b){_0x330bfb=_0x330bfb-0x0;var _0x1d1cb8=_0x06bc[_0x330bfb];return _0x1d1cb8;};'use strict';var BPromise=require('bluebird');var server=require(_0xc06b('0x0'));var Realtime=require('./realtime');var EmailChannel=require('./lib/email');var mailAccount=require('./rpc/mailAccount');var setting=require(_0xc06b('0x1'));var realtime=new Realtime();var email=new EmailChannel(realtime);function initRealtime(){return BPromise[_0xc06b('0x2')]()['then'](mailAccount[_0xc06b('0x3')]())[_0xc06b('0x4')](realtime[_0xc06b('0x5')]())[_0xc06b('0x4')](function(){email['refresh'](realtime[_0xc06b('0x6')]);return realtime;});}function main(){return server['listen'](realtime,email)[_0xc06b('0x4')](function(){return initRealtime();})[_0xc06b('0x4')](function(){return setting['getSettings']();})[_0xc06b('0x4')](function(_0x4c58b7){return setInterval(initRealtime,_0x4c58b7[_0xc06b('0x7')]*0x3e8);})[_0xc06b('0x8')](function(_0x1f61ba){console[_0xc06b('0x9')](_0x1f61ba);});}main();
\ No newline at end of file
+var _0x9220=['loginMailFrequency','catch','error','./server','./lib/email','./rpc/mailAccount','./rpc/setting','email','resolve','then','initMailAccounts','mailAccounts','listen','getSettings'];(function(_0x14b2dd,_0x8130a0){var _0x5defab=function(_0x22eef2){while(--_0x22eef2){_0x14b2dd['push'](_0x14b2dd['shift']());}};_0x5defab(++_0x8130a0);}(_0x9220,0x1d1));var _0x0922=function(_0x4ff09b,_0x53f67d){_0x4ff09b=_0x4ff09b-0x0;var _0x3f5c2e=_0x9220[_0x4ff09b];return _0x3f5c2e;};'use strict';var server=require(_0x0922('0x0'));var Realtime=require('./realtime');var EmailChannel=require(_0x0922('0x1'));var mailAccount=require(_0x0922('0x2'));var setting=require(_0x0922('0x3'));var logger=require('../../config/logger')(_0x0922('0x4'));var realtime=new Realtime();var email=new EmailChannel(realtime);function initRealtime(){return Promise[_0x0922('0x5')]()['then'](mailAccount['getMailAccounts']())[_0x0922('0x6')](realtime[_0x0922('0x7')]())['then'](function(){email['refresh'](realtime[_0x0922('0x8')]);return realtime;});}function main(){return server[_0x0922('0x9')](realtime,email)['then'](function(){return initRealtime();})['then'](function(){return setting[_0x0922('0xa')]();})['then'](function(_0x394421){return setInterval(initRealtime,_0x394421[_0x0922('0xb')]*0x3e8);})[_0x0922('0xc')](function(_0x4286ee){logger[_0x0922('0xd')]('Email\x20service\x20initialization',_0x4286ee);});}main();
\ No newline at end of file