Built motion from commit 10af8726.|2.6.34
[motion2.git] / server / services / agi / 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 _0x9c20=['bluebird','jayson/promise','client','http','request','then','catch','sendMailMessage','SendMail'];(function(_0x307095,_0x1bdd6f){var _0xbf46c1=function(_0x37106c){while(--_0x37106c){_0x307095['push'](_0x307095['shift']());}};_0xbf46c1(++_0x1bdd6f);}(_0x9c20,0x6c));var _0x09c2=function(_0x2f4202,_0x8f6064){_0x2f4202=_0x2f4202-0x0;var _0x3b21b3=_0x9c20[_0x2f4202];return _0x3b21b3;};'use strict';var BPromise=require(_0x09c2('0x0'));var jayson=require(_0x09c2('0x1'));var client=jayson[_0x09c2('0x2')][_0x09c2('0x3')]({'port':0x232b});function request(_0x5dcbf5,_0x297547){return new BPromise(function(_0x348a7e,_0x2d8bea){return client[_0x09c2('0x4')](_0x5dcbf5,_0x297547)[_0x09c2('0x5')](function(_0x2bf2ed){if(_0x2bf2ed['error']){return _0x2d8bea(_0x2bf2ed['error']['message']);}else{return _0x348a7e(_0x2bf2ed['result']);}})[_0x09c2('0x6')](function(_0x3d8dab){return _0x2d8bea(_0x3d8dab);});});}exports[_0x09c2('0x7')]=function(_0x8396e7,_0x4d008f){return request(_0x09c2('0x8'),{'account':_0x8396e7,'message':_0x4d008f});};