Built motion from commit (unavailable).|2.5.21
[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 _0x1c69=['sendMail','toString','verify','Not\x20verifired','exports','nodemailer','bluebird','nodemailer-plugin-inline-base64','prototype','send','createTransport','use','compile'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0x1c69,0x1bf));var _0x91c6=function(_0x346737,_0x3e6081){_0x346737=_0x346737-0x0;var _0x1ade2e=_0x1c69[_0x346737];return _0x1ade2e;};'use strict';var nodemailer=require(_0x91c6('0x0'));var BPromise=require(_0x91c6('0x1'));var inlineBase64=require(_0x91c6('0x2'));function EmailSmtp(){}EmailSmtp[_0x91c6('0x3')][_0x91c6('0x4')]=function(_0x1c5e33,_0x27da83){return new BPromise(function(_0x1ae060,_0x4500bf){var _0x3c8006=nodemailer[_0x91c6('0x5')](_0x1c5e33);_0x3c8006[_0x91c6('0x6')](_0x91c6('0x7'),inlineBase64());_0x3c8006[_0x91c6('0x8')](_0x27da83,function(_0x1ceb6d,_0x27b5aa){if(_0x1ceb6d){_0x4500bf(_0x1ceb6d[_0x91c6('0x9')]());}else{_0x1ae060(_0x27b5aa);}});});};EmailSmtp['prototype'][_0x91c6('0xa')]=function(_0x332b9e){return new BPromise(function(_0x4d5f9d,_0x1b64cc){var _0x173a35=nodemailer[_0x91c6('0x5')](_0x332b9e);_0x173a35[_0x91c6('0xa')](function(_0x48ea12,_0x337f67){if(_0x48ea12){_0x1b64cc(_0x48ea12[_0x91c6('0x9')]());}else{if(_0x337f67){_0x4d5f9d(_0x337f67);}else{_0x1b64cc(_0x91c6('0xb'));}}});});};module[_0x91c6('0xc')]=EmailSmtp;