1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0x9307=['message','catch','SendMail','bluebird','jayson/promise','client','http','then','error'];(function(_0x491796,_0x57848c){var _0x20429c=function(_0x4f097f){while(--_0x4f097f){_0x491796['push'](_0x491796['shift']());}};_0x20429c(++_0x57848c);}(_0x9307,0x18f));var _0x7930=function(_0x165d90,_0x1f922e){_0x165d90=_0x165d90-0x0;var _0x5022be=_0x9307[_0x165d90];return _0x5022be;};'use strict';var BPromise=require(_0x7930('0x0'));var jayson=require(_0x7930('0x1'));var client=jayson[_0x7930('0x2')][_0x7930('0x3')]({'port':0x232b});function request(_0x425873,_0x1e82b1){return new BPromise(function(_0xf429bb,_0x360a12){return client['request'](_0x425873,_0x1e82b1)[_0x7930('0x4')](function(_0x1b0f65){if(_0x1b0f65[_0x7930('0x5')]){return _0x360a12(_0x1b0f65[_0x7930('0x5')][_0x7930('0x6')]);}else{return _0xf429bb(_0x1b0f65['result']);}})[_0x7930('0x7')](function(_0x3dec51){return _0x360a12(_0x3dec51);});});}exports['sendMailMessage']=function(_0x2f324e,_0x29b9e1){return request(_0x7930('0x8'),{'account':_0x2f324e,'message':_0x29b9e1});};