Built motion from commit ddca4d0d.|2.5.47
[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 _0xf8eb=['exports','nodemailer','send','createTransport','use','compile','prototype','verify','toString','Not\x20verifired'];(function(_0x275f19,_0x37c89a){var _0x5f533b=function(_0x259353){while(--_0x259353){_0x275f19['push'](_0x275f19['shift']());}};_0x5f533b(++_0x37c89a);}(_0xf8eb,0x123));var _0xbf8e=function(_0xe51596,_0x314d5b){_0xe51596=_0xe51596-0x0;var _0x22c705=_0xf8eb[_0xe51596];return _0x22c705;};'use strict';var nodemailer=require(_0xbf8e('0x0'));var inlineBase64=require('nodemailer-plugin-inline-base64');function EmailSmtp(){}EmailSmtp['prototype'][_0xbf8e('0x1')]=function(_0x4aee09,_0x564822){return new Promise(function(_0x595729,_0x2b70da){var _0x132183=nodemailer[_0xbf8e('0x2')](_0x4aee09);_0x132183[_0xbf8e('0x3')](_0xbf8e('0x4'),inlineBase64());_0x132183['sendMail'](_0x564822,function(_0x1ccf60,_0x25647a){if(_0x1ccf60){_0x2b70da(_0x1ccf60['toString']());}else{_0x595729(_0x25647a);}});});};EmailSmtp[_0xbf8e('0x5')][_0xbf8e('0x6')]=function(_0x1d9f19){return new Promise(function(_0x4cac4b,_0x221301){var _0x138b81=nodemailer[_0xbf8e('0x2')](_0x1d9f19);_0x138b81[_0xbf8e('0x6')](function(_0x270670,_0x4e5b4a){if(_0x270670){_0x221301(_0x270670[_0xbf8e('0x7')]());}else{if(_0x4e5b4a){_0x4cac4b(_0x4e5b4a);}else{_0x221301(_0xbf8e('0x8'));}}});});};module[_0xbf8e('0x9')]=EmailSmtp;