Built motion from commit 3d3e98f2.|2.6.29
[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 _0x9913=['toString','exports','nodemailer','nodemailer-plugin-inline-base64','prototype','send','createTransport','use','compile','verify'];(function(_0x5ed97f,_0x140b1d){var _0xfcd062=function(_0x21dd3e){while(--_0x21dd3e){_0x5ed97f['push'](_0x5ed97f['shift']());}};_0xfcd062(++_0x140b1d);}(_0x9913,0xca));var _0x3991=function(_0x424a9a,_0x2dd9af){_0x424a9a=_0x424a9a-0x0;var _0xa7831c=_0x9913[_0x424a9a];return _0xa7831c;};'use strict';var nodemailer=require(_0x3991('0x0'));var inlineBase64=require(_0x3991('0x1'));function EmailSmtp(){}EmailSmtp[_0x3991('0x2')][_0x3991('0x3')]=function(_0x2b54b,_0x386b15){return new Promise(function(_0x1468f9,_0x2627e4){var _0x551190=nodemailer[_0x3991('0x4')](_0x2b54b);_0x551190[_0x3991('0x5')](_0x3991('0x6'),inlineBase64());_0x551190['sendMail'](_0x386b15,function(_0x2d4f37,_0x190434){if(_0x2d4f37){_0x2627e4(_0x2d4f37['toString']());}else{_0x1468f9(_0x190434);}});});};EmailSmtp[_0x3991('0x2')][_0x3991('0x7')]=function(_0x56cc49){return new Promise(function(_0x2d3d97,_0x394a35){var _0x327e37=nodemailer['createTransport'](_0x56cc49);_0x327e37[_0x3991('0x7')](function(_0xf7b6dc,_0xda32fc){if(_0xf7b6dc){_0x394a35(_0xf7b6dc[_0x3991('0x8')]());}else{if(_0xda32fc){_0x2d3d97(_0xda32fc);}else{_0x394a35('Not\x20verifired');}}});});};module[_0x3991('0x9')]=EmailSmtp;