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 _0x4e3c=['compile','toString','verify','bluebird','nodemailer-plugin-inline-base64','prototype','createTransport','use'];(function(_0x5fa432,_0x2bed66){var _0x57cd5a=function(_0x12adfc){while(--_0x12adfc){_0x5fa432['push'](_0x5fa432['shift']());}};_0x57cd5a(++_0x2bed66);}(_0x4e3c,0xb3));var _0xc4e3=function(_0x33ab57,_0x449de8){_0x33ab57=_0x33ab57-0x0;var _0x3af8ce=_0x4e3c[_0x33ab57];return _0x3af8ce;};'use strict';var nodemailer=require('nodemailer');var BPromise=require(_0xc4e3('0x0'));var inlineBase64=require(_0xc4e3('0x1'));function EmailSmtp(){}EmailSmtp[_0xc4e3('0x2')]['send']=function(_0x27d900,_0x152df3){return new BPromise(function(_0x380a61,_0x20f042){var _0x57c6d3=nodemailer[_0xc4e3('0x3')](_0x27d900);_0x57c6d3[_0xc4e3('0x4')](_0xc4e3('0x5'),inlineBase64());_0x57c6d3['sendMail'](_0x152df3,function(_0x187675,_0x1629da){if(_0x187675){_0x20f042(_0x187675[_0xc4e3('0x6')]());}else{_0x380a61(_0x1629da);}});});};EmailSmtp[_0xc4e3('0x2')][_0xc4e3('0x7')]=function(_0x20719f){return new BPromise(function(_0x2a6544,_0x153e15){var _0x12a48d=nodemailer[_0xc4e3('0x3')](_0x20719f);_0x12a48d['verify'](function(_0x34c8fa,_0x43f615){if(_0x34c8fa){_0x153e15(_0x34c8fa[_0xc4e3('0x6')]());}else{if(_0x43f615){_0x2a6544(_0x43f615);}else{_0x153e15('Not\x20verifired');}}});});};module['exports']=EmailSmtp;