Built motion from commit 639a1a7f.|2.6.19
[motion2.git] / server / services / email / server / index.js
index a16a8a8..a0b466a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a6d=['RPC\x20listening\x20on\x20port:','jayson/promise','bluebird','../../../config/logger','listen','sendMail','account','message','then','catch','verifySmtp','Verified','error','values','mailAccounts','length','Imap','Smtp','pass','http','stringify','127.0.0.1','log','Email\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!'];(function(_0x3dc252,_0x3b9f15){var _0xb259e4=function(_0x17e164){while(--_0x17e164){_0x3dc252['push'](_0x3dc252['shift']());}};_0xb259e4(++_0x3b9f15);}(_0x7a6d,0x91));var _0xd7a6=function(_0x2f9467,_0x40576f){_0x2f9467=_0x2f9467-0x0;var _0x39894c=_0x7a6d[_0x2f9467];return _0x39894c;};'use strict';var jayson=require(_0xd7a6('0x0'));var BPromise=require(_0xd7a6('0x1'));var _=require('lodash');var logger=require(_0xd7a6('0x2'))('email');exports[_0xd7a6('0x3')]=function(_0x5e3a2a,_0x49c8e4){return new BPromise(function(_0x5458f9,_0x1f3b0e){var _0x3570f5={'SendMail':function(_0x2df438){var _0x46c84a=this;return new Promise(function(_0x43b62b,_0x2b8cc6){_0x49c8e4[_0xd7a6('0x4')](_0x2df438[_0xd7a6('0x5')],_0x2df438[_0xd7a6('0x6')])[_0xd7a6('0x7')](function(_0x3d3ac5){_0x43b62b({'code':0xc8,'message':_0x3d3ac5});})[_0xd7a6('0x8')](function(_0x342e1b){_0x2b8cc6(_0x46c84a['error'](0x1f4,_0x342e1b));});});},'VerifySmtp':function(_0x5620c6){var _0x224d6f=this;return new Promise(function(_0x12fc5b,_0x3fa8aa){_0x49c8e4[_0xd7a6('0x9')](_0x5620c6[_0xd7a6('0x5')])[_0xd7a6('0x7')](function(_0xcc8a35){_0x12fc5b({'code':0xc8,'message':_0xd7a6('0xa')});})[_0xd7a6('0x8')](function(_0xf8ac38){_0x3fa8aa(_0x224d6f[_0xd7a6('0xb')](0x1f4,_0xf8ac38));});});},'MailAccounts':function(_0x55231d){return new Promise(function(_0x117e0f,_0x32824b){var _0x498750=_[_0xd7a6('0xc')](_0x5e3a2a[_0xd7a6('0xd')]);for(var _0x48230e=0x0;_0x48230e<_0x498750[_0xd7a6('0xe')];_0x48230e+=0x1){if(_0x498750[_0x48230e][_0xd7a6('0xf')]&&_0x498750[_0x48230e][_0xd7a6('0xf')]['password']){delete _0x498750[_0x48230e][_0xd7a6('0xf')]['password'];}if(_0x498750[_0x48230e][_0xd7a6('0x10')]&&_0x498750[_0x48230e]['Smtp'][_0xd7a6('0x11')]){delete _0x498750[_0x48230e][_0xd7a6('0x10')][_0xd7a6('0x11')];}}_0x117e0f({'count':_0x498750[_0xd7a6('0xe')],'rows':_0x498750});});}};var _0x320e88=jayson['server'](_0x3570f5)[_0xd7a6('0x12')]();_0x320e88['on'](_0xd7a6('0xb'),function(_0x12eeb5){logger[_0xd7a6('0xb')](JSON[_0xd7a6('0x13')](_0x12eeb5));return _0x1f3b0e(_0x12eeb5);});_0x320e88[_0xd7a6('0x3')](0x232b,_0xd7a6('0x14'),function(){console[_0xd7a6('0x15')](_0xd7a6('0x16'),0x232b);return _0x5458f9(_0xd7a6('0x17')+0x232b);});});};
\ No newline at end of file
+var _0xa9e0=['catch','values','mailAccounts','length','Imap','password','Smtp','pass','server','http','stringify','127.0.0.1','log','Email\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','jayson/promise','bluebird','lodash','listen','sendMail','then','error','Verified'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2576d7,_0x167624){_0x2576d7=_0x2576d7-0x0;var _0x16a08c=_0xa9e0[_0x2576d7];return _0x16a08c;};'use strict';var jayson=require(_0x0a9e('0x0'));var BPromise=require(_0x0a9e('0x1'));var _=require(_0x0a9e('0x2'));var logger=require('../../../config/logger')('email');exports[_0x0a9e('0x3')]=function(_0x4ce2f1,_0x333808){return new BPromise(function(_0x432180,_0x2ab90b){var _0x991246={'SendMail':function(_0x981158){var _0x57b080=this;return new Promise(function(_0x219af0,_0x441e3a){_0x333808[_0x0a9e('0x4')](_0x981158['account'],_0x981158['message'])[_0x0a9e('0x5')](function(_0x56465b){_0x219af0({'code':0xc8,'message':_0x56465b});})['catch'](function(_0x39753a){_0x441e3a(_0x57b080[_0x0a9e('0x6')](0x1f4,_0x39753a));});});},'VerifySmtp':function(_0x307b3e){var _0x3ab53f=this;return new Promise(function(_0xfeb75b,_0xbd1168){_0x333808['verifySmtp'](_0x307b3e['account'])['then'](function(_0x4cfe67){_0xfeb75b({'code':0xc8,'message':_0x0a9e('0x7')});})[_0x0a9e('0x8')](function(_0xd5b662){_0xbd1168(_0x3ab53f[_0x0a9e('0x6')](0x1f4,_0xd5b662));});});},'MailAccounts':function(_0x32d742){return new Promise(function(_0x69aeb7,_0x5db4b0){var _0x4283ce=_[_0x0a9e('0x9')](_0x4ce2f1[_0x0a9e('0xa')]);for(var _0x281129=0x0;_0x281129<_0x4283ce[_0x0a9e('0xb')];_0x281129+=0x1){if(_0x4283ce[_0x281129][_0x0a9e('0xc')]&&_0x4283ce[_0x281129]['Imap'][_0x0a9e('0xd')]){delete _0x4283ce[_0x281129]['Imap'][_0x0a9e('0xd')];}if(_0x4283ce[_0x281129]['Smtp']&&_0x4283ce[_0x281129][_0x0a9e('0xe')][_0x0a9e('0xf')]){delete _0x4283ce[_0x281129]['Smtp'][_0x0a9e('0xf')];}}_0x69aeb7({'count':_0x4283ce['length'],'rows':_0x4283ce});});}};var _0x459eb1=jayson[_0x0a9e('0x10')](_0x991246)[_0x0a9e('0x11')]();_0x459eb1['on'](_0x0a9e('0x6'),function(_0x31b1ca){logger[_0x0a9e('0x6')](JSON[_0x0a9e('0x12')](_0x31b1ca));return _0x2ab90b(_0x31b1ca);});_0x459eb1[_0x0a9e('0x3')](0x232b,_0x0a9e('0x13'),function(){console[_0x0a9e('0x14')](_0x0a9e('0x15'),0x232b);return _0x432180(_0x0a9e('0x16')+0x232b);});});};
\ No newline at end of file