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 _0x078a=['client','http','error','message','sendMailMessage','SendMail','jayson/promise'];(function(_0x3e90a9,_0x5c8248){var _0x38c610=function(_0x217f55){while(--_0x217f55){_0x3e90a9['push'](_0x3e90a9['shift']());}};_0x38c610(++_0x5c8248);}(_0x078a,0x1db));var _0xa078=function(_0x5a1ce1,_0x2095e9){_0x5a1ce1=_0x5a1ce1-0x0;var _0x178be=_0x078a[_0x5a1ce1];return _0x178be;};'use strict';var BPromise=require('bluebird');var jayson=require(_0xa078('0x0'));var client=jayson[_0xa078('0x1')][_0xa078('0x2')]({'port':0x232b});function request(_0x1f1a85,_0x9c9d6f){return new BPromise(function(_0x7bfd84,_0x28b911){return client['request'](_0x1f1a85,_0x9c9d6f)['then'](function(_0x598227){if(_0x598227[_0xa078('0x3')]){return _0x28b911(_0x598227[_0xa078('0x3')][_0xa078('0x4')]);}else{return _0x7bfd84(_0x598227['result']);}})['catch'](function(_0x38b6c1){return _0x28b911(_0x38b6c1);});});}exports[_0xa078('0x5')]=function(_0x5866f5,_0x3ece53){return request(_0xa078('0x6'),{'account':_0x5866f5,'message':_0x3ece53});};