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 _0xbfde=['client','http','then','error','result','catch'];(function(_0x2a9e39,_0x357028){var _0x202f44=function(_0x1b7ca8){while(--_0x1b7ca8){_0x2a9e39['push'](_0x2a9e39['shift']());}};_0x202f44(++_0x357028);}(_0xbfde,0x162));var _0xebfd=function(_0x2e9df7,_0x1d2e69){_0x2e9df7=_0x2e9df7-0x0;var _0x454500=_0xbfde[_0x2e9df7];return _0x454500;};'use strict';var BPromise=require('bluebird');var jayson=require('jayson/promise');var client=jayson[_0xebfd('0x0')][_0xebfd('0x1')]({'port':0x232b});function request(_0x3ba81d,_0x27f8f0){return new BPromise(function(_0xdd7e22,_0xc30d20){return client['request'](_0x3ba81d,_0x27f8f0)[_0xebfd('0x2')](function(_0x22d158){if(_0x22d158[_0xebfd('0x3')]){return _0xc30d20(_0x22d158['error']['message']);}else{return _0xdd7e22(_0x22d158[_0xebfd('0x4')]);}})[_0xebfd('0x5')](function(_0x2ca5c0){return _0xc30d20(_0x2ca5c0);});});}exports['sendMailMessage']=function(_0x4c3551,_0x2c3c33){return request('SendMail',{'account':_0x4c3551,'message':_0x2c3c33});};