d31390d7e9055b629621c0c3c4e5ea852037b096
[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 _0x1750=['toString','verify','Not\x20verifired','exports','nodemailer','nodemailer-plugin-inline-base64','prototype','send','createTransport','use','sendMail'];(function(_0x937c60,_0x495ce8){var _0x47dca0=function(_0x339c06){while(--_0x339c06){_0x937c60['push'](_0x937c60['shift']());}};_0x47dca0(++_0x495ce8);}(_0x1750,0x143));var _0x0175=function(_0xaa0309,_0x1c8008){_0xaa0309=_0xaa0309-0x0;var _0x5de7ce=_0x1750[_0xaa0309];return _0x5de7ce;};'use strict';var nodemailer=require(_0x0175('0x0'));var inlineBase64=require(_0x0175('0x1'));function EmailSmtp(){}EmailSmtp[_0x0175('0x2')][_0x0175('0x3')]=function(_0xff6c4,_0x3b025f){return new Promise(function(_0x4d69e3,_0x26d183){var _0x33534a=nodemailer[_0x0175('0x4')](_0xff6c4);_0x33534a[_0x0175('0x5')]('compile',inlineBase64());_0x33534a[_0x0175('0x6')](_0x3b025f,function(_0x5d469f,_0xd3a6f6){if(_0x5d469f){_0x26d183(_0x5d469f[_0x0175('0x7')]());}else{_0x4d69e3(_0xd3a6f6);}});});};EmailSmtp[_0x0175('0x2')][_0x0175('0x8')]=function(_0x292555){return new Promise(function(_0x24d54d,_0x15f049){var _0x3f4fbf=nodemailer[_0x0175('0x4')](_0x292555);_0x3f4fbf[_0x0175('0x8')](function(_0x9ec7be,_0x4b8a67){if(_0x9ec7be){_0x15f049(_0x9ec7be[_0x0175('0x7')]());}else{if(_0x4b8a67){_0x24d54d(_0x4b8a67);}else{_0x15f049(_0x0175('0x9'));}}});});};module[_0x0175('0xa')]=EmailSmtp;