Built motion from commit c116dc8b.|2.6.30
[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 _0xe613=['createTransport','use','sendMail','toString','verify','Not\x20verifired','exports','nodemailer','nodemailer-plugin-inline-base64','prototype','send'];(function(_0x4f6ffd,_0x316dd8){var _0x34a32e=function(_0x386980){while(--_0x386980){_0x4f6ffd['push'](_0x4f6ffd['shift']());}};_0x34a32e(++_0x316dd8);}(_0xe613,0xb7));var _0x3e61=function(_0x54c6e2,_0x41a8f8){_0x54c6e2=_0x54c6e2-0x0;var _0x36523a=_0xe613[_0x54c6e2];return _0x36523a;};'use strict';var nodemailer=require(_0x3e61('0x0'));var inlineBase64=require(_0x3e61('0x1'));function EmailSmtp(){}EmailSmtp[_0x3e61('0x2')][_0x3e61('0x3')]=function(_0x134f2a,_0x509af3){return new Promise(function(_0x5005c1,_0x5da644){var _0x39c979=nodemailer[_0x3e61('0x4')](_0x134f2a);_0x39c979[_0x3e61('0x5')]('compile',inlineBase64());_0x39c979[_0x3e61('0x6')](_0x509af3,function(_0x54c35f,_0x2b5227){if(_0x54c35f){_0x5da644(_0x54c35f[_0x3e61('0x7')]());}else{_0x5005c1(_0x2b5227);}});});};EmailSmtp[_0x3e61('0x2')][_0x3e61('0x8')]=function(_0x23927f){return new Promise(function(_0x380e49,_0x21a357){var _0x5e1bbb=nodemailer[_0x3e61('0x4')](_0x23927f);_0x5e1bbb['verify'](function(_0x55b526,_0x4e96b4){if(_0x55b526){_0x21a357(_0x55b526['toString']());}else{if(_0x4e96b4){_0x380e49(_0x4e96b4);}else{_0x21a357(_0x3e61('0x9'));}}});});};module[_0x3e61('0xa')]=EmailSmtp;