Built motion from commit (unavailable).|2.4.18
[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 _0xad5d=['createTransport','use','compile','sendMail','verify','toString','Not\x20verifired','exports','nodemailer','bluebird','nodemailer-plugin-inline-base64','prototype'];(function(_0xfcfd92,_0x238aba){var _0x45fb99=function(_0x82232a){while(--_0x82232a){_0xfcfd92['push'](_0xfcfd92['shift']());}};_0x45fb99(++_0x238aba);}(_0xad5d,0x1e8));var _0xdad5=function(_0xb0a3c4,_0x472476){_0xb0a3c4=_0xb0a3c4-0x0;var _0x2c19f7=_0xad5d[_0xb0a3c4];return _0x2c19f7;};'use strict';var nodemailer=require(_0xdad5('0x0'));var BPromise=require(_0xdad5('0x1'));var inlineBase64=require(_0xdad5('0x2'));function EmailSmtp(){}EmailSmtp[_0xdad5('0x3')]['send']=function(_0x20993b,_0xe0f4c0){return new BPromise(function(_0x439060,_0x2a9a27){var _0x1ae5c9=nodemailer[_0xdad5('0x4')](_0x20993b);_0x1ae5c9[_0xdad5('0x5')](_0xdad5('0x6'),inlineBase64());_0x1ae5c9[_0xdad5('0x7')](_0xe0f4c0,function(_0x20c549,_0xdfb2cf){if(_0x20c549){_0x2a9a27(_0x20c549['toString']());}else{_0x439060(_0xdfb2cf);}});});};EmailSmtp[_0xdad5('0x3')][_0xdad5('0x8')]=function(_0x5e1beb){return new BPromise(function(_0x551395,_0x3ad61f){var _0xea9c19=nodemailer[_0xdad5('0x4')](_0x5e1beb);_0xea9c19['verify'](function(_0x2c3a1c,_0x8619d6){if(_0x2c3a1c){_0x3ad61f(_0x2c3a1c[_0xdad5('0x9')]());}else{if(_0x8619d6){_0x551395(_0x8619d6);}else{_0x3ad61f(_0xdad5('0xa'));}}});});};module[_0xdad5('0xb')]=EmailSmtp;