Built motion from commit 092f8824.|2.5.49
[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 _0x9fe8=['toString','prototype','verify','Not\x20verifired','nodemailer','nodemailer-plugin-inline-base64','send','createTransport','use','compile','sendMail'];(function(_0x1da527,_0x2dc953){var _0x40fc7c=function(_0x9949f5){while(--_0x9949f5){_0x1da527['push'](_0x1da527['shift']());}};_0x40fc7c(++_0x2dc953);}(_0x9fe8,0x122));var _0x89fe=function(_0x30e757,_0x3666d1){_0x30e757=_0x30e757-0x0;var _0x487c7d=_0x9fe8[_0x30e757];return _0x487c7d;};'use strict';var nodemailer=require(_0x89fe('0x0'));var inlineBase64=require(_0x89fe('0x1'));function EmailSmtp(){}EmailSmtp['prototype'][_0x89fe('0x2')]=function(_0xb3e7de,_0x4fb78c){return new Promise(function(_0x571eb3,_0x502deb){var _0x1e8bde=nodemailer[_0x89fe('0x3')](_0xb3e7de);_0x1e8bde[_0x89fe('0x4')](_0x89fe('0x5'),inlineBase64());_0x1e8bde[_0x89fe('0x6')](_0x4fb78c,function(_0x41a472,_0x12a2bd){if(_0x41a472){_0x502deb(_0x41a472[_0x89fe('0x7')]());}else{_0x571eb3(_0x12a2bd);}});});};EmailSmtp[_0x89fe('0x8')][_0x89fe('0x9')]=function(_0x2822c7){return new Promise(function(_0x2e9298,_0x5869d0){var _0x151cb2=nodemailer[_0x89fe('0x3')](_0x2822c7);_0x151cb2[_0x89fe('0x9')](function(_0x179ffc,_0x34f21f){if(_0x179ffc){_0x5869d0(_0x179ffc[_0x89fe('0x7')]());}else{if(_0x34f21f){_0x2e9298(_0x34f21f);}else{_0x5869d0(_0x89fe('0xa'));}}});});};module['exports']=EmailSmtp;