Built motion from commit f7863d46.|2.5.41
[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 _0xcff3=['createTransport','verify','toString','Not\x20verifired','exports','nodemailer','nodemailer-plugin-inline-base64','prototype','compile','sendMail'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0xcff3,0xaf));var _0x3cff=function(_0x4cdcdc,_0x34eac7){_0x4cdcdc=_0x4cdcdc-0x0;var _0x4704ce=_0xcff3[_0x4cdcdc];return _0x4704ce;};'use strict';var nodemailer=require(_0x3cff('0x0'));var inlineBase64=require(_0x3cff('0x1'));function EmailSmtp(){}EmailSmtp[_0x3cff('0x2')]['send']=function(_0xbd1d44,_0x4840){return new Promise(function(_0x3d8238,_0x2f4959){var _0x3ccd09=nodemailer['createTransport'](_0xbd1d44);_0x3ccd09['use'](_0x3cff('0x3'),inlineBase64());_0x3ccd09[_0x3cff('0x4')](_0x4840,function(_0x47ad4f,_0xd65cb7){if(_0x47ad4f){_0x2f4959(_0x47ad4f['toString']());}else{_0x3d8238(_0xd65cb7);}});});};EmailSmtp[_0x3cff('0x2')]['verify']=function(_0xff938e){return new Promise(function(_0x2c7572,_0x14f1a6){var _0x516e61=nodemailer[_0x3cff('0x5')](_0xff938e);_0x516e61[_0x3cff('0x6')](function(_0x676b1a,_0x1c401f){if(_0x676b1a){_0x14f1a6(_0x676b1a[_0x3cff('0x7')]());}else{if(_0x1c401f){_0x2c7572(_0x1c401f);}else{_0x14f1a6(_0x3cff('0x8'));}}});});};module[_0x3cff('0x9')]=EmailSmtp;