Built motion from commit 9d0783e6.|2.6.13
[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 _0x69f3=['exports','nodemailer','nodemailer-plugin-inline-base64','prototype','createTransport','compile','sendMail','toString','verify','Not\x20verifired'];(function(_0x5a59e9,_0x2da104){var _0x1242f4=function(_0x5b1f00){while(--_0x5b1f00){_0x5a59e9['push'](_0x5a59e9['shift']());}};_0x1242f4(++_0x2da104);}(_0x69f3,0x119));var _0x369f=function(_0x23073a,_0x3144ae){_0x23073a=_0x23073a-0x0;var _0x672fdd=_0x69f3[_0x23073a];return _0x672fdd;};'use strict';var nodemailer=require(_0x369f('0x0'));var inlineBase64=require(_0x369f('0x1'));function EmailSmtp(){}EmailSmtp[_0x369f('0x2')]['send']=function(_0x87d232,_0x358c78){return new Promise(function(_0x541e30,_0x4f4353){var _0x2769fa=nodemailer[_0x369f('0x3')](_0x87d232);_0x2769fa['use'](_0x369f('0x4'),inlineBase64());_0x2769fa[_0x369f('0x5')](_0x358c78,function(_0x9d7965,_0x4ac8d3){if(_0x9d7965){_0x4f4353(_0x9d7965[_0x369f('0x6')]());}else{_0x541e30(_0x4ac8d3);}});});};EmailSmtp['prototype']['verify']=function(_0x1e590f){return new Promise(function(_0x1bfc7a,_0x4289b2){var _0x508800=nodemailer[_0x369f('0x3')](_0x1e590f);_0x508800[_0x369f('0x7')](function(_0x39278d,_0x4c089f){if(_0x39278d){_0x4289b2(_0x39278d[_0x369f('0x6')]());}else{if(_0x4c089f){_0x1bfc7a(_0x4c089f);}else{_0x4289b2(_0x369f('0x8'));}}});});};module[_0x369f('0x9')]=EmailSmtp;