Built motion from commit 5293bb2a.|2.6.30
[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 _0x49f9=['jayson/promise','client','http','request','then','error','catch','sendMailMessage','SendMail','bluebird'];(function(_0x201bab,_0x4364bd){var _0x3bd407=function(_0x5d1b61){while(--_0x5d1b61){_0x201bab['push'](_0x201bab['shift']());}};_0x3bd407(++_0x4364bd);}(_0x49f9,0xf9));var _0x949f=function(_0x193e28,_0x3dac1d){_0x193e28=_0x193e28-0x0;var _0x20ef59=_0x49f9[_0x193e28];return _0x20ef59;};'use strict';var BPromise=require(_0x949f('0x0'));var jayson=require(_0x949f('0x1'));var client=jayson[_0x949f('0x2')][_0x949f('0x3')]({'port':0x232b});function request(_0x4a09e4,_0x48a16d){return new BPromise(function(_0x3315d6,_0x281f25){return client[_0x949f('0x4')](_0x4a09e4,_0x48a16d)[_0x949f('0x5')](function(_0x2f5e38){if(_0x2f5e38['error']){return _0x281f25(_0x2f5e38[_0x949f('0x6')]['message']);}else{return _0x3315d6(_0x2f5e38['result']);}})[_0x949f('0x7')](function(_0x4fe153){return _0x281f25(_0x4fe153);});});}exports[_0x949f('0x8')]=function(_0x143689,_0x19aef5){return request(_0x949f('0x9'),{'account':_0x143689,'message':_0x19aef5});};