d5b113993fbd0765fa6e3b89b2a31b04afb8c9d1
[motion2.git] / server / services / email / lib / smtp.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 _0xe35f=['use','compile','sendMail','prototype','verify','toString','Not\x20verifired','nodemailer','nodemailer-plugin-inline-base64','send','createTransport'];(function(_0x340756,_0xad31ae){var _0x2ef745=function(_0x59ffde){while(--_0x59ffde){_0x340756['push'](_0x340756['shift']());}};_0x2ef745(++_0xad31ae);}(_0xe35f,0x6a));var _0xfe35=function(_0x4ffd6e,_0x3c34c5){_0x4ffd6e=_0x4ffd6e-0x0;var _0x289d67=_0xe35f[_0x4ffd6e];return _0x289d67;};'use strict';var nodemailer=require(_0xfe35('0x0'));var inlineBase64=require(_0xfe35('0x1'));function EmailSmtp(){}EmailSmtp['prototype'][_0xfe35('0x2')]=function(_0x2d3172,_0x416ed2){return new Promise(function(_0x37df62,_0x2710a8){var _0x4a9b5e=nodemailer[_0xfe35('0x3')](_0x2d3172);_0x4a9b5e[_0xfe35('0x4')](_0xfe35('0x5'),inlineBase64());_0x4a9b5e[_0xfe35('0x6')](_0x416ed2,function(_0x10be9c,_0x3f88a7){if(_0x10be9c){_0x2710a8(_0x10be9c['toString']());}else{_0x37df62(_0x3f88a7);}});});};EmailSmtp[_0xfe35('0x7')][_0xfe35('0x8')]=function(_0x4b2dbc){return new Promise(function(_0x62597e,_0x28ec9b){var _0x2a806c=nodemailer['createTransport'](_0x4b2dbc);_0x2a806c[_0xfe35('0x8')](function(_0xf63c11,_0x48e6d7){if(_0xf63c11){_0x28ec9b(_0xf63c11[_0xfe35('0x9')]());}else{if(_0x48e6d7){_0x62597e(_0x48e6d7);}else{_0x28ec9b(_0xfe35('0xa'));}}});});};module['exports']=EmailSmtp;