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 _0x002d=['client','http','request','then','error','message','result','sendMailMessage','SendMail','jayson/promise'];(function(_0x3ef0d8,_0x522412){var _0x390017=function(_0x37445c){while(--_0x37445c){_0x3ef0d8['push'](_0x3ef0d8['shift']());}};_0x390017(++_0x522412);}(_0x002d,0x15d));var _0xd002=function(_0x330b78,_0xa98d8a){_0x330b78=_0x330b78-0x0;var _0x1e5219=_0x002d[_0x330b78];return _0x1e5219;};'use strict';var BPromise=require('bluebird');var jayson=require(_0xd002('0x0'));var client=jayson[_0xd002('0x1')][_0xd002('0x2')]({'port':0x232b});function request(_0x3f79f1,_0x3cf2a3){return new BPromise(function(_0x49aacf,_0x3943d6){return client[_0xd002('0x3')](_0x3f79f1,_0x3cf2a3)[_0xd002('0x4')](function(_0x3b21fb){if(_0x3b21fb['error']){return _0x3943d6(_0x3b21fb[_0xd002('0x5')][_0xd002('0x6')]);}else{return _0x49aacf(_0x3b21fb[_0xd002('0x7')]);}})['catch'](function(_0x6e6b35){return _0x3943d6(_0x6e6b35);});});}exports[_0xd002('0x8')]=function(_0x5d5b54,_0x15b5c7){return request(_0xd002('0x9'),{'account':_0x5d5b54,'message':_0x15b5c7});};