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 _0xd9e8=['SendMail','bluebird','client','request','then','error','result','catch','sendMailMessage'];(function(_0x17726c,_0x372fb4){var _0x458a1b=function(_0x34c8ab){while(--_0x34c8ab){_0x17726c['push'](_0x17726c['shift']());}};_0x458a1b(++_0x372fb4);}(_0xd9e8,0x172));var _0x8d9e=function(_0x59c2f8,_0x515317){_0x59c2f8=_0x59c2f8-0x0;var _0x50e296=_0xd9e8[_0x59c2f8];return _0x50e296;};'use strict';var BPromise=require(_0x8d9e('0x0'));var jayson=require('jayson/promise');var client=jayson[_0x8d9e('0x1')]['http']({'port':0x232b});function request(_0x1e763c,_0x574ba7){return new BPromise(function(_0x5e3aba,_0x3f10eb){return client[_0x8d9e('0x2')](_0x1e763c,_0x574ba7)[_0x8d9e('0x3')](function(_0x841304){if(_0x841304[_0x8d9e('0x4')]){return _0x3f10eb(_0x841304[_0x8d9e('0x4')]['message']);}else{return _0x5e3aba(_0x841304[_0x8d9e('0x5')]);}})[_0x8d9e('0x6')](function(_0x540efa){return _0x3f10eb(_0x540efa);});});}exports[_0x8d9e('0x7')]=function(_0x2e0bdc,_0x3be3d2){return request(_0x8d9e('0x8'),{'account':_0x2e0bdc,'message':_0x3be3d2});};