Built motion from commit fe909640.|2.6.8
[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 _0xef1e=['verify','Not\x20verifired','exports','nodemailer','nodemailer-plugin-inline-base64','prototype','createTransport','use','compile','sendMail','toString'];(function(_0x38f558,_0x2f45b5){var _0x46df21=function(_0x1fa1af){while(--_0x1fa1af){_0x38f558['push'](_0x38f558['shift']());}};_0x46df21(++_0x2f45b5);}(_0xef1e,0xdf));var _0xeef1=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0xef1e[_0x17d9e3];return _0x14192d;};'use strict';var nodemailer=require(_0xeef1('0x0'));var inlineBase64=require(_0xeef1('0x1'));function EmailSmtp(){}EmailSmtp[_0xeef1('0x2')]['send']=function(_0x521394,_0x8135c1){return new Promise(function(_0x9c463d,_0x35f580){var _0x57fefd=nodemailer[_0xeef1('0x3')](_0x521394);_0x57fefd[_0xeef1('0x4')](_0xeef1('0x5'),inlineBase64());_0x57fefd[_0xeef1('0x6')](_0x8135c1,function(_0x25d23b,_0x23bfcc){if(_0x25d23b){_0x35f580(_0x25d23b[_0xeef1('0x7')]());}else{_0x9c463d(_0x23bfcc);}});});};EmailSmtp[_0xeef1('0x2')][_0xeef1('0x8')]=function(_0x23bd0a){return new Promise(function(_0x35483c,_0x45cda9){var _0x3a7c3d=nodemailer[_0xeef1('0x3')](_0x23bd0a);_0x3a7c3d[_0xeef1('0x8')](function(_0x16b0a2,_0x23b1be){if(_0x16b0a2){_0x45cda9(_0x16b0a2[_0xeef1('0x7')]());}else{if(_0x23b1be){_0x35483c(_0x23b1be);}else{_0x45cda9(_0xeef1('0x9'));}}});});};module[_0xeef1('0xa')]=EmailSmtp;