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 _0xf606=['SendMail','jayson/promise','client','http','request','then','error','message','result','catch'];(function(_0x4fe8b6,_0x546b0c){var _0xcb7848=function(_0x4bd8a4){while(--_0x4bd8a4){_0x4fe8b6['push'](_0x4fe8b6['shift']());}};_0xcb7848(++_0x546b0c);}(_0xf606,0x8d));var _0x6f60=function(_0x46f2d2,_0x4ae4ca){_0x46f2d2=_0x46f2d2-0x0;var _0x5e8c54=_0xf606[_0x46f2d2];return _0x5e8c54;};'use strict';var BPromise=require('bluebird');var jayson=require(_0x6f60('0x0'));var client=jayson[_0x6f60('0x1')][_0x6f60('0x2')]({'port':0x232b});function request(_0x20b7bf,_0x3a0752){return new BPromise(function(_0x830bf8,_0x4dfaf3){return client[_0x6f60('0x3')](_0x20b7bf,_0x3a0752)[_0x6f60('0x4')](function(_0x337eb7){if(_0x337eb7[_0x6f60('0x5')]){return _0x4dfaf3(_0x337eb7['error'][_0x6f60('0x6')]);}else{return _0x830bf8(_0x337eb7[_0x6f60('0x7')]);}})[_0x6f60('0x8')](function(_0x3e5356){return _0x4dfaf3(_0x3e5356);});});}exports['sendMailMessage']=function(_0x3e662b,_0x4461f3){return request(_0x6f60('0x9'),{'account':_0x3e662b,'message':_0x4461f3});};