Built motion from commit ff426b3f.|2.6.29
[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 _0x97c6=['prototype','send','createTransport','compile','sendMail','toString','verify','Not\x20verifired','exports','nodemailer-plugin-inline-base64'];(function(_0x54e217,_0x243297){var _0x590ead=function(_0x2f1d78){while(--_0x2f1d78){_0x54e217['push'](_0x54e217['shift']());}};_0x590ead(++_0x243297);}(_0x97c6,0x1ad));var _0x697c=function(_0x178f52,_0x5d9675){_0x178f52=_0x178f52-0x0;var _0x556f99=_0x97c6[_0x178f52];return _0x556f99;};'use strict';var nodemailer=require('nodemailer');var inlineBase64=require(_0x697c('0x0'));function EmailSmtp(){}EmailSmtp[_0x697c('0x1')][_0x697c('0x2')]=function(_0x51a4d5,_0x2574af){return new Promise(function(_0x459b15,_0x5b249b){var _0x634b5b=nodemailer[_0x697c('0x3')](_0x51a4d5);_0x634b5b['use'](_0x697c('0x4'),inlineBase64());_0x634b5b[_0x697c('0x5')](_0x2574af,function(_0x261a72,_0x4c3994){if(_0x261a72){_0x5b249b(_0x261a72[_0x697c('0x6')]());}else{_0x459b15(_0x4c3994);}});});};EmailSmtp[_0x697c('0x1')][_0x697c('0x7')]=function(_0x2b5afb){return new Promise(function(_0x370c78,_0x11757a){var _0x50dad1=nodemailer[_0x697c('0x3')](_0x2b5afb);_0x50dad1['verify'](function(_0x10e205,_0x117553){if(_0x10e205){_0x11757a(_0x10e205[_0x697c('0x6')]());}else{if(_0x117553){_0x370c78(_0x117553);}else{_0x11757a(_0x697c('0x8'));}}});});};module[_0x697c('0x9')]=EmailSmtp;