Built motion from commit 6db1674d.|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 _0x4226=['verify','Not\x20verifired','exports','nodemailer','prototype','send','createTransport','use','toString'];(function(_0x5f3f88,_0x562baf){var _0xd08119=function(_0x42dbf7){while(--_0x42dbf7){_0x5f3f88['push'](_0x5f3f88['shift']());}};_0xd08119(++_0x562baf);}(_0x4226,0x8a));var _0x6422=function(_0x233f74,_0x4502bc){_0x233f74=_0x233f74-0x0;var _0x399a05=_0x4226[_0x233f74];return _0x399a05;};'use strict';var nodemailer=require(_0x6422('0x0'));var inlineBase64=require('nodemailer-plugin-inline-base64');function EmailSmtp(){}EmailSmtp[_0x6422('0x1')][_0x6422('0x2')]=function(_0x439622,_0x2a5c60){return new Promise(function(_0x588689,_0x17f6d4){var _0x2a3fcd=nodemailer[_0x6422('0x3')](_0x439622);_0x2a3fcd[_0x6422('0x4')]('compile',inlineBase64());_0x2a3fcd['sendMail'](_0x2a5c60,function(_0x22a695,_0x42418e){if(_0x22a695){_0x17f6d4(_0x22a695[_0x6422('0x5')]());}else{_0x588689(_0x42418e);}});});};EmailSmtp[_0x6422('0x1')][_0x6422('0x6')]=function(_0x521d57){return new Promise(function(_0x1a9e46,_0x5c5af0){var _0x55666b=nodemailer[_0x6422('0x3')](_0x521d57);_0x55666b[_0x6422('0x6')](function(_0x2485df,_0x260d71){if(_0x2485df){_0x5c5af0(_0x2485df[_0x6422('0x5')]());}else{if(_0x260d71){_0x1a9e46(_0x260d71);}else{_0x5c5af0(_0x6422('0x7'));}}});});};module[_0x6422('0x8')]=EmailSmtp;