Built motion from commit 25580385.|2.6.2
[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 _0x0121=['toString','verify','nodemailer','prototype','send','createTransport','use','compile','sendMail'];(function(_0x396b7a,_0x1edac5){var _0x3ee7eb=function(_0x1010cb){while(--_0x1010cb){_0x396b7a['push'](_0x396b7a['shift']());}};_0x3ee7eb(++_0x1edac5);}(_0x0121,0x1c4));var _0x1012=function(_0xbc540d,_0x1fa8c9){_0xbc540d=_0xbc540d-0x0;var _0x3c8ef6=_0x0121[_0xbc540d];return _0x3c8ef6;};'use strict';var nodemailer=require(_0x1012('0x0'));var inlineBase64=require('nodemailer-plugin-inline-base64');function EmailSmtp(){}EmailSmtp[_0x1012('0x1')][_0x1012('0x2')]=function(_0x5115ae,_0x49c0cb){return new Promise(function(_0x30a4cb,_0x1202b8){var _0x373096=nodemailer[_0x1012('0x3')](_0x5115ae);_0x373096[_0x1012('0x4')](_0x1012('0x5'),inlineBase64());_0x373096[_0x1012('0x6')](_0x49c0cb,function(_0x4c10d0,_0x2598c8){if(_0x4c10d0){_0x1202b8(_0x4c10d0[_0x1012('0x7')]());}else{_0x30a4cb(_0x2598c8);}});});};EmailSmtp[_0x1012('0x1')][_0x1012('0x8')]=function(_0x463c59){return new Promise(function(_0x385923,_0x127743){var _0x1b0eb0=nodemailer[_0x1012('0x3')](_0x463c59);_0x1b0eb0[_0x1012('0x8')](function(_0x5870db,_0x497f29){if(_0x5870db){_0x127743(_0x5870db['toString']());}else{if(_0x497f29){_0x385923(_0x497f29);}else{_0x127743('Not\x20verifired');}}});});};module['exports']=EmailSmtp;