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 _0x7574=['http','then','error','message','result','sendMailMessage','SendMail'];(function(_0x399fcb,_0x302cad){var _0x4d5f0f=function(_0x317d96){while(--_0x317d96){_0x399fcb['push'](_0x399fcb['shift']());}};_0x4d5f0f(++_0x302cad);}(_0x7574,0xc4));var _0x4757=function(_0x50071a,_0x305006){_0x50071a=_0x50071a-0x0;var _0x309281=_0x7574[_0x50071a];return _0x309281;};'use strict';var BPromise=require('bluebird');var jayson=require('jayson/promise');var client=jayson['client'][_0x4757('0x0')]({'port':0x232b});function request(_0x9bc077,_0x104063){return new BPromise(function(_0x4e7cbc,_0x32a34e){return client['request'](_0x9bc077,_0x104063)[_0x4757('0x1')](function(_0x352d9a){if(_0x352d9a[_0x4757('0x2')]){return _0x32a34e(_0x352d9a[_0x4757('0x2')][_0x4757('0x3')]);}else{return _0x4e7cbc(_0x352d9a[_0x4757('0x4')]);}})['catch'](function(_0x38b10e){return _0x32a34e(_0x38b10e);});});}exports[_0x4757('0x5')]=function(_0x1fe981,_0x9ae565){return request(_0x4757('0x6'),{'account':_0x1fe981,'message':_0x9ae565});};