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 _0xdb11=['error','catch','SendMail','jayson/promise','client','http','request'];(function(_0x3888eb,_0x491f7d){var _0x15a319=function(_0x56f4b0){while(--_0x56f4b0){_0x3888eb['push'](_0x3888eb['shift']());}};_0x15a319(++_0x491f7d);}(_0xdb11,0x1b5));var _0x1db1=function(_0xaa0309,_0x1c8008){_0xaa0309=_0xaa0309-0x0;var _0x5de7ce=_0xdb11[_0xaa0309];return _0x5de7ce;};'use strict';var BPromise=require('bluebird');var jayson=require(_0x1db1('0x0'));var client=jayson[_0x1db1('0x1')][_0x1db1('0x2')]({'port':0x232b});function request(_0x54c9da,_0x18240c){return new BPromise(function(_0x3458a4,_0x57d131){return client[_0x1db1('0x3')](_0x54c9da,_0x18240c)['then'](function(_0xf255f3){if(_0xf255f3[_0x1db1('0x4')]){return _0x57d131(_0xf255f3['error']['message']);}else{return _0x3458a4(_0xf255f3['result']);}})[_0x1db1('0x5')](function(_0x3e4c0b){return _0x57d131(_0x3e4c0b);});});}exports['sendMailMessage']=function(_0x261cd2,_0x1dfc1f){return request(_0x1db1('0x6'),{'account':_0x261cd2,'message':_0x1dfc1f});};