Built motion from commit 10af8726.|2.6.34
[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 _0x9f23=['client','request','then','error','message','result','catch','sendMailMessage','SendMail','bluebird','jayson/promise'];(function(_0x2e48f2,_0x4da923){var _0x42fc00=function(_0x30e35c){while(--_0x30e35c){_0x2e48f2['push'](_0x2e48f2['shift']());}};_0x42fc00(++_0x4da923);}(_0x9f23,0xf0));var _0x39f2=function(_0x121693,_0x1a22ed){_0x121693=_0x121693-0x0;var _0x32d8fb=_0x9f23[_0x121693];return _0x32d8fb;};'use strict';var BPromise=require(_0x39f2('0x0'));var jayson=require(_0x39f2('0x1'));var client=jayson[_0x39f2('0x2')]['http']({'port':0x232b});function request(_0x54741a,_0xb5db58){return new BPromise(function(_0x203512,_0x2a8fee){return client[_0x39f2('0x3')](_0x54741a,_0xb5db58)[_0x39f2('0x4')](function(_0x3d343e){if(_0x3d343e[_0x39f2('0x5')]){return _0x2a8fee(_0x3d343e[_0x39f2('0x5')][_0x39f2('0x6')]);}else{return _0x203512(_0x3d343e[_0x39f2('0x7')]);}})[_0x39f2('0x8')](function(_0x5eca4b){return _0x2a8fee(_0x5eca4b);});});}exports[_0x39f2('0x9')]=function(_0x5c147d,_0x270337){return request(_0x39f2('0xa'),{'account':_0x5c147d,'message':_0x270337});};