Built motion from commit e6806ed6.|2.6.0
[motion2.git] / server / services / agi / mailRpc / index.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xe693=['catch','sendMailMessage','SendMail','bluebird','jayson/promise','client','http','request','then','error','result'];(function(_0x5234db,_0x3727e4){var _0x256c3b=function(_0x597f78){while(--_0x597f78){_0x5234db['push'](_0x5234db['shift']());}};_0x256c3b(++_0x3727e4);}(_0xe693,0x116));var _0x3e69=function(_0x4f0c2b,_0x2c9d14){_0x4f0c2b=_0x4f0c2b-0x0;var _0x526436=_0xe693[_0x4f0c2b];return _0x526436;};'use strict';var BPromise=require(_0x3e69('0x0'));var jayson=require(_0x3e69('0x1'));var client=jayson[_0x3e69('0x2')][_0x3e69('0x3')]({'port':0x232b});function request(_0x571521,_0x4d7a12){return new BPromise(function(_0x565532,_0x2a5aae){return client[_0x3e69('0x4')](_0x571521,_0x4d7a12)[_0x3e69('0x5')](function(_0x3c2441){if(_0x3c2441[_0x3e69('0x6')]){return _0x2a5aae(_0x3c2441['error']['message']);}else{return _0x565532(_0x3c2441[_0x3e69('0x7')]);}})[_0x3e69('0x8')](function(_0x5b5e3c){return _0x2a5aae(_0x5b5e3c);});});}exports[_0x3e69('0x9')]=function(_0x584e93,_0x1f1edb){return request(_0x3e69('0xa'),{'account':_0x584e93,'message':_0x1f1edb});};