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 _0xe255=['then','error','result','sendMailMessage','SendMail','bluebird','client','http','request'];(function(_0x50c58f,_0x274887){var _0x21435c=function(_0x3867d6){while(--_0x3867d6){_0x50c58f['push'](_0x50c58f['shift']());}};_0x21435c(++_0x274887);}(_0xe255,0x176));var _0x5e25=function(_0x1d5691,_0x6042b5){_0x1d5691=_0x1d5691-0x0;var _0x579db8=_0xe255[_0x1d5691];return _0x579db8;};'use strict';var BPromise=require(_0x5e25('0x0'));var jayson=require('jayson/promise');var client=jayson[_0x5e25('0x1')][_0x5e25('0x2')]({'port':0x232b});function request(_0x2f91a9,_0xceed16){return new BPromise(function(_0x1c58b5,_0x426525){return client[_0x5e25('0x3')](_0x2f91a9,_0xceed16)[_0x5e25('0x4')](function(_0x16b2dd){if(_0x16b2dd['error']){return _0x426525(_0x16b2dd[_0x5e25('0x5')]['message']);}else{return _0x1c58b5(_0x16b2dd[_0x5e25('0x6')]);}})['catch'](function(_0x358332){return _0x426525(_0x358332);});});}exports[_0x5e25('0x7')]=function(_0x1e93e6,_0x2326b){return request(_0x5e25('0x8'),{'account':_0x1e93e6,'message':_0x2326b});};