Built motion from commit 1fa89557.|2.6.10
[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 _0x92b6=['bluebird','jayson/promise','client','http','error','message','catch','sendMailMessage','SendMail'];(function(_0x58bad4,_0xd6e8d2){var _0x1d1bbc=function(_0x44570c){while(--_0x44570c){_0x58bad4['push'](_0x58bad4['shift']());}};_0x1d1bbc(++_0xd6e8d2);}(_0x92b6,0x171));var _0x692b=function(_0x49ed8e,_0x2d7099){_0x49ed8e=_0x49ed8e-0x0;var _0x5f16bb=_0x92b6[_0x49ed8e];return _0x5f16bb;};'use strict';var BPromise=require(_0x692b('0x0'));var jayson=require(_0x692b('0x1'));var client=jayson[_0x692b('0x2')][_0x692b('0x3')]({'port':0x232b});function request(_0x3b924a,_0x33061f){return new BPromise(function(_0x5a4701,_0x3a919e){return client['request'](_0x3b924a,_0x33061f)['then'](function(_0x34c96c){if(_0x34c96c[_0x692b('0x4')]){return _0x3a919e(_0x34c96c['error'][_0x692b('0x5')]);}else{return _0x5a4701(_0x34c96c['result']);}})[_0x692b('0x6')](function(_0x3d29f1){return _0x3a919e(_0x3d29f1);});});}exports[_0x692b('0x7')]=function(_0x993af0,_0x3db5ce){return request(_0x692b('0x8'),{'account':_0x993af0,'message':_0x3db5ce});};