Built motion from commit 377f727e.|2.6.28
[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 _0x7ac2=['jayson/promise','client','http','error','message','result','catch','SendMail','bluebird'];(function(_0x2922c,_0x31eb7c){var _0xfef5a0=function(_0x568d00){while(--_0x568d00){_0x2922c['push'](_0x2922c['shift']());}};_0xfef5a0(++_0x31eb7c);}(_0x7ac2,0x167));var _0x27ac=function(_0x5ca2a4,_0x1a8527){_0x5ca2a4=_0x5ca2a4-0x0;var _0x4e9b9d=_0x7ac2[_0x5ca2a4];return _0x4e9b9d;};'use strict';var BPromise=require(_0x27ac('0x0'));var jayson=require(_0x27ac('0x1'));var client=jayson[_0x27ac('0x2')][_0x27ac('0x3')]({'port':0x232b});function request(_0x4f01dd,_0x434498){return new BPromise(function(_0x44a49f,_0x3c73c4){return client['request'](_0x4f01dd,_0x434498)['then'](function(_0x3620da){if(_0x3620da[_0x27ac('0x4')]){return _0x3c73c4(_0x3620da[_0x27ac('0x4')][_0x27ac('0x5')]);}else{return _0x44a49f(_0x3620da[_0x27ac('0x6')]);}})[_0x27ac('0x7')](function(_0x2d5989){return _0x3c73c4(_0x2d5989);});});}exports['sendMailMessage']=function(_0xff504b,_0x5473af){return request(_0x27ac('0x8'),{'account':_0xff504b,'message':_0x5473af});};