Built motion from commit 9e1399f3.|2.5.37
[motion2.git] / server / services / routing / 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 _0x1357=['jayson/promise','client','http','then','error','result','catch','sendMailMessage','SendMail','bluebird'];(function(_0x286cba,_0xee48ba){var _0xed5411=function(_0x2314e3){while(--_0x2314e3){_0x286cba['push'](_0x286cba['shift']());}};_0xed5411(++_0xee48ba);}(_0x1357,0x135));var _0x7135=function(_0x5f25d2,_0x437b56){_0x5f25d2=_0x5f25d2-0x0;var _0x3bac32=_0x1357[_0x5f25d2];return _0x3bac32;};'use strict';var BPromise=require(_0x7135('0x0'));var jayson=require(_0x7135('0x1'));var client=jayson[_0x7135('0x2')][_0x7135('0x3')]({'port':0x232b});function request(_0x25dac6,_0x591a1f){return new BPromise(function(_0x494d09,_0x19a8e7){return client['request'](_0x25dac6,_0x591a1f)[_0x7135('0x4')](function(_0x3d35b2){if(_0x3d35b2[_0x7135('0x5')]){return _0x19a8e7(_0x3d35b2['error']['message']);}else{return _0x494d09(_0x3d35b2[_0x7135('0x6')]);}})[_0x7135('0x7')](function(_0x25a607){return _0x19a8e7(_0x25a607);});});}exports[_0x7135('0x8')]=function(_0x557a74,_0x4c08fd){return request(_0x7135('0x9'),{'account':_0x557a74,'message':_0x4c08fd});};