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 _0x14a9=['jayson/promise','client','http','request','error','message','catch','sendMailMessage','SendMail'];(function(_0x25f7d9,_0x56c8f7){var _0x48f1d1=function(_0x447d99){while(--_0x447d99){_0x25f7d9['push'](_0x25f7d9['shift']());}};_0x48f1d1(++_0x56c8f7);}(_0x14a9,0x1c2));var _0x914a=function(_0x40bf27,_0x103e47){_0x40bf27=_0x40bf27-0x0;var _0x3356b2=_0x14a9[_0x40bf27];return _0x3356b2;};'use strict';var BPromise=require('bluebird');var jayson=require(_0x914a('0x0'));var client=jayson[_0x914a('0x1')][_0x914a('0x2')]({'port':0x232b});function request(_0xfaafb5,_0xc20946){return new BPromise(function(_0x4dc683,_0x523946){return client[_0x914a('0x3')](_0xfaafb5,_0xc20946)['then'](function(_0x5b04b5){if(_0x5b04b5['error']){return _0x523946(_0x5b04b5[_0x914a('0x4')][_0x914a('0x5')]);}else{return _0x4dc683(_0x5b04b5['result']);}})[_0x914a('0x6')](function(_0x54692e){return _0x523946(_0x54692e);});});}exports[_0x914a('0x7')]=function(_0x26e210,_0x5db13d){return request(_0x914a('0x8'),{'account':_0x26e210,'message':_0x5db13d});};