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 _0x8bfb=['result','catch','sendMailMessage','SendMail','bluebird','client','request','error'];(function(_0x46809b,_0xf62788){var _0x14d974=function(_0x357258){while(--_0x357258){_0x46809b['push'](_0x46809b['shift']());}};_0x14d974(++_0xf62788);}(_0x8bfb,0x1f4));var _0xb8bf=function(_0x32e820,_0x1f9a44){_0x32e820=_0x32e820-0x0;var _0x43bc7a=_0x8bfb[_0x32e820];return _0x43bc7a;};'use strict';var BPromise=require(_0xb8bf('0x0'));var jayson=require('jayson/promise');var client=jayson[_0xb8bf('0x1')]['http']({'port':0x232b});function request(_0x7ee6f2,_0x4a2887){return new BPromise(function(_0x430a54,_0x3ff36b){return client[_0xb8bf('0x2')](_0x7ee6f2,_0x4a2887)['then'](function(_0x33ceb0){if(_0x33ceb0[_0xb8bf('0x3')]){return _0x3ff36b(_0x33ceb0[_0xb8bf('0x3')]['message']);}else{return _0x430a54(_0x33ceb0[_0xb8bf('0x4')]);}})[_0xb8bf('0x5')](function(_0x539a94){return _0x3ff36b(_0x539a94);});});}exports[_0xb8bf('0x6')]=function(_0x4349b7,_0x8e5490){return request(_0xb8bf('0x7'),{'account':_0x4349b7,'message':_0x8e5490});};