Built motion from commit 616d3211.|2.6.4
[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 _0xed6c=['use','compile','sendMail','verify','toString','Not\x20verifired','exports','nodemailer','nodemailer-plugin-inline-base64','prototype','createTransport'];(function(_0x51b5f4,_0x5c38fd){var _0x300467=function(_0xaca2d0){while(--_0xaca2d0){_0x51b5f4['push'](_0x51b5f4['shift']());}};_0x300467(++_0x5c38fd);}(_0xed6c,0x10f));var _0xced6=function(_0x178856,_0x41f045){_0x178856=_0x178856-0x0;var _0x3c7fe7=_0xed6c[_0x178856];return _0x3c7fe7;};'use strict';var nodemailer=require(_0xced6('0x0'));var inlineBase64=require(_0xced6('0x1'));function EmailSmtp(){}EmailSmtp[_0xced6('0x2')]['send']=function(_0x42259e,_0x19c5a2){return new Promise(function(_0x43ae08,_0x398b64){var _0x64547=nodemailer[_0xced6('0x3')](_0x42259e);_0x64547[_0xced6('0x4')](_0xced6('0x5'),inlineBase64());_0x64547[_0xced6('0x6')](_0x19c5a2,function(_0x3334e9,_0x212cf6){if(_0x3334e9){_0x398b64(_0x3334e9['toString']());}else{_0x43ae08(_0x212cf6);}});});};EmailSmtp['prototype'][_0xced6('0x7')]=function(_0x327225){return new Promise(function(_0x67291f,_0x3b3295){var _0x52f6f4=nodemailer[_0xced6('0x3')](_0x327225);_0x52f6f4[_0xced6('0x7')](function(_0x412f41,_0x1fd391){if(_0x412f41){_0x3b3295(_0x412f41[_0xced6('0x8')]());}else{if(_0x1fd391){_0x67291f(_0x1fd391);}else{_0x3b3295(_0xced6('0x9'));}}});});};module[_0xced6('0xa')]=EmailSmtp;