Built motion from commit 497d3d92.|2.5.43
[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 _0x9361=['compile','toString','verify','Not\x20verifired','exports','nodemailer-plugin-inline-base64','prototype','createTransport','use'];(function(_0x5b5ede,_0x47eec9){var _0x105417=function(_0xee006f){while(--_0xee006f){_0x5b5ede['push'](_0x5b5ede['shift']());}};_0x105417(++_0x47eec9);}(_0x9361,0x12e));var _0x1936=function(_0x4680ca,_0x5f076a){_0x4680ca=_0x4680ca-0x0;var _0x3de8e7=_0x9361[_0x4680ca];return _0x3de8e7;};'use strict';var nodemailer=require('nodemailer');var inlineBase64=require(_0x1936('0x0'));function EmailSmtp(){}EmailSmtp[_0x1936('0x1')]['send']=function(_0x545a2a,_0x13eef8){return new Promise(function(_0x3dffab,_0x72cc29){var _0x57c950=nodemailer[_0x1936('0x2')](_0x545a2a);_0x57c950[_0x1936('0x3')](_0x1936('0x4'),inlineBase64());_0x57c950['sendMail'](_0x13eef8,function(_0x22fd9c,_0x110947){if(_0x22fd9c){_0x72cc29(_0x22fd9c[_0x1936('0x5')]());}else{_0x3dffab(_0x110947);}});});};EmailSmtp[_0x1936('0x1')]['verify']=function(_0x523a43){return new Promise(function(_0x24de58,_0x25b331){var _0x5d2f54=nodemailer[_0x1936('0x2')](_0x523a43);_0x5d2f54[_0x1936('0x6')](function(_0x496f78,_0x1b3c13){if(_0x496f78){_0x25b331(_0x496f78[_0x1936('0x5')]());}else{if(_0x1b3c13){_0x24de58(_0x1b3c13);}else{_0x25b331(_0x1936('0x7'));}}});});};module[_0x1936('0x8')]=EmailSmtp;