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 _0x96ac=['catch','sendMailMessage','SendMail','jayson/promise','client','http','then','error','message','result'];(function(_0x24cf7f,_0xcda231){var _0x4c6742=function(_0x2469db){while(--_0x2469db){_0x24cf7f['push'](_0x24cf7f['shift']());}};_0x4c6742(++_0xcda231);}(_0x96ac,0x139));var _0xc96a=function(_0x28fdc0,_0x4222f4){_0x28fdc0=_0x28fdc0-0x0;var _0x9b6bb1=_0x96ac[_0x28fdc0];return _0x9b6bb1;};'use strict';var BPromise=require('bluebird');var jayson=require(_0xc96a('0x0'));var client=jayson[_0xc96a('0x1')][_0xc96a('0x2')]({'port':0x232b});function request(_0x5195e9,_0x378973){return new BPromise(function(_0xed20ea,_0x40620c){return client['request'](_0x5195e9,_0x378973)[_0xc96a('0x3')](function(_0xf33cb8){if(_0xf33cb8[_0xc96a('0x4')]){return _0x40620c(_0xf33cb8[_0xc96a('0x4')][_0xc96a('0x5')]);}else{return _0xed20ea(_0xf33cb8[_0xc96a('0x6')]);}})[_0xc96a('0x7')](function(_0x53bd55){return _0x40620c(_0x53bd55);});});}exports[_0xc96a('0x8')]=function(_0x2d6d31,_0x4f7c8b){return request(_0xc96a('0x9'),{'account':_0x2d6d31,'message':_0x4f7c8b});};