1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x0d05=['request','error','catch','sendMailMessage','bluebird','jayson/promise','client','http'];(function(_0x19159a,_0x1cb5c3){var _0xa677f4=function(_0x24bb85){while(--_0x24bb85){_0x19159a['push'](_0x19159a['shift']());}};_0xa677f4(++_0x1cb5c3);}(_0x0d05,0x12c));var _0x50d0=function(_0x3f0406,_0x3d338d){_0x3f0406=_0x3f0406-0x0;var _0x667f30=_0x0d05[_0x3f0406];return _0x667f30;};'use strict';var BPromise=require(_0x50d0('0x0'));var jayson=require(_0x50d0('0x1'));var client=jayson[_0x50d0('0x2')][_0x50d0('0x3')]({'port':0x232b});function request(_0x2718bb,_0x380d41){return new BPromise(function(_0x4c2225,_0x38c6b3){return client[_0x50d0('0x4')](_0x2718bb,_0x380d41)['then'](function(_0x146101){if(_0x146101[_0x50d0('0x5')]){return _0x38c6b3(_0x146101[_0x50d0('0x5')]['message']);}else{return _0x4c2225(_0x146101['result']);}})[_0x50d0('0x6')](function(_0xc1468e){return _0x38c6b3(_0xc1468e);});});}exports[_0x50d0('0x7')]=function(_0x41de40,_0x403fd8){return request('SendMail',{'account':_0x41de40,'message':_0x403fd8});};