Built motion from commit da24aabd.|2.6.20
[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 _0x83c2=['http','request','then','error','message','catch','sendMailMessage','SendMail','bluebird','jayson/promise','client'];(function(_0x58bac5,_0x36c57c){var _0x3ce755=function(_0x204498){while(--_0x204498){_0x58bac5['push'](_0x58bac5['shift']());}};_0x3ce755(++_0x36c57c);}(_0x83c2,0x110));var _0x283c=function(_0x5b64a1,_0x2ec810){_0x5b64a1=_0x5b64a1-0x0;var _0x4b6f55=_0x83c2[_0x5b64a1];return _0x4b6f55;};'use strict';var BPromise=require(_0x283c('0x0'));var jayson=require(_0x283c('0x1'));var client=jayson[_0x283c('0x2')][_0x283c('0x3')]({'port':0x232b});function request(_0x3674b4,_0x4e318d){return new BPromise(function(_0x43c4e3,_0x2215c1){return client[_0x283c('0x4')](_0x3674b4,_0x4e318d)[_0x283c('0x5')](function(_0x3aeb5e){if(_0x3aeb5e['error']){return _0x2215c1(_0x3aeb5e[_0x283c('0x6')][_0x283c('0x7')]);}else{return _0x43c4e3(_0x3aeb5e['result']);}})[_0x283c('0x8')](function(_0x155704){return _0x2215c1(_0x155704);});});}exports[_0x283c('0x9')]=function(_0x499560,_0x5e1986){return request(_0x283c('0xa'),{'account':_0x499560,'message':_0x5e1986});};