Built motion from commit d5e4af8c.|2.6.23
[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 _0xf05e=['sendMail','toString','verify','Not\x20verifired','exports','nodemailer','nodemailer-plugin-inline-base64','prototype','send','createTransport','compile'];(function(_0x6c993a,_0x5ea3ab){var _0x27f547=function(_0x22df20){while(--_0x22df20){_0x6c993a['push'](_0x6c993a['shift']());}};_0x27f547(++_0x5ea3ab);}(_0xf05e,0x1bd));var _0xef05=function(_0x63904a,_0x273d0b){_0x63904a=_0x63904a-0x0;var _0x2e8639=_0xf05e[_0x63904a];return _0x2e8639;};'use strict';var nodemailer=require(_0xef05('0x0'));var inlineBase64=require(_0xef05('0x1'));function EmailSmtp(){}EmailSmtp[_0xef05('0x2')][_0xef05('0x3')]=function(_0x2b877d,_0x52658d){return new Promise(function(_0x3cea8a,_0x2e299c){var _0x23079e=nodemailer[_0xef05('0x4')](_0x2b877d);_0x23079e['use'](_0xef05('0x5'),inlineBase64());_0x23079e[_0xef05('0x6')](_0x52658d,function(_0x28e0a2,_0x32c301){if(_0x28e0a2){_0x2e299c(_0x28e0a2[_0xef05('0x7')]());}else{_0x3cea8a(_0x32c301);}});});};EmailSmtp['prototype'][_0xef05('0x8')]=function(_0x3ce9af){return new Promise(function(_0xac011a,_0x401394){var _0x2eb3dc=nodemailer[_0xef05('0x4')](_0x3ce9af);_0x2eb3dc['verify'](function(_0x40a21c,_0x3eba1c){if(_0x40a21c){_0x401394(_0x40a21c['toString']());}else{if(_0x3eba1c){_0xac011a(_0x3eba1c);}else{_0x401394(_0xef05('0x9'));}}});});};module[_0xef05('0xa')]=EmailSmtp;