fc0019f360c24bf36af00ddc4da3431fa584bb42
[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 _0x4991=['sendMail','verify','toString','Not\x20verifired','exports','nodemailer','nodemailer-plugin-inline-base64','prototype','createTransport','use','compile'];(function(_0x4ff5a2,_0xb33150){var _0xe162f6=function(_0x321cbd){while(--_0x321cbd){_0x4ff5a2['push'](_0x4ff5a2['shift']());}};_0xe162f6(++_0xb33150);}(_0x4991,0x186));var _0x1499=function(_0x3e00ca,_0xe4824b){_0x3e00ca=_0x3e00ca-0x0;var _0xe1bcdc=_0x4991[_0x3e00ca];return _0xe1bcdc;};'use strict';var nodemailer=require(_0x1499('0x0'));var inlineBase64=require(_0x1499('0x1'));function EmailSmtp(){}EmailSmtp[_0x1499('0x2')]['send']=function(_0x40bc06,_0x3105fd){return new Promise(function(_0x14c442,_0x4e6eb6){var _0x46ce84=nodemailer[_0x1499('0x3')](_0x40bc06);_0x46ce84[_0x1499('0x4')](_0x1499('0x5'),inlineBase64());_0x46ce84[_0x1499('0x6')](_0x3105fd,function(_0x49b1a0,_0x53fccd){if(_0x49b1a0){_0x4e6eb6(_0x49b1a0['toString']());}else{_0x14c442(_0x53fccd);}});});};EmailSmtp[_0x1499('0x2')][_0x1499('0x7')]=function(_0x52d87e){return new Promise(function(_0x3eaf86,_0x3335f3){var _0x4cf5d3=nodemailer[_0x1499('0x3')](_0x52d87e);_0x4cf5d3[_0x1499('0x7')](function(_0x19fe9f,_0x353931){if(_0x19fe9f){_0x3335f3(_0x19fe9f[_0x1499('0x8')]());}else{if(_0x353931){_0x3eaf86(_0x353931);}else{_0x3335f3(_0x1499('0x9'));}}});});};module[_0x1499('0xa')]=EmailSmtp;