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 _0x237c=['http','request','then','error','sendMailMessage','SendMail','jayson/promise','client'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0x237c,0xbe));var _0xc237=function(_0x446a13,_0x223117){_0x446a13=_0x446a13-0x0;var _0x28b7c8=_0x237c[_0x446a13];return _0x28b7c8;};'use strict';var BPromise=require('bluebird');var jayson=require(_0xc237('0x0'));var client=jayson[_0xc237('0x1')][_0xc237('0x2')]({'port':0x232b});function request(_0x1edb6c,_0x2a834f){return new BPromise(function(_0x37cb92,_0x1daebb){return client[_0xc237('0x3')](_0x1edb6c,_0x2a834f)[_0xc237('0x4')](function(_0x2c016c){if(_0x2c016c[_0xc237('0x5')]){return _0x1daebb(_0x2c016c[_0xc237('0x5')]['message']);}else{return _0x37cb92(_0x2c016c['result']);}})['catch'](function(_0xbb8132){return _0x1daebb(_0xbb8132);});});}exports[_0xc237('0x6')]=function(_0x45c3c2,_0x56dc74){return request(_0xc237('0x7'),{'account':_0x45c3c2,'message':_0x56dc74});};