Built motion from commit b0a9a629.|2.6.33
[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 _0x6dc2=['prototype','createTransport','use','compile','toString','verify','Not\x20verifired','exports','nodemailer'];(function(_0x1ac595,_0x5d2081){var _0x455fff=function(_0x3043ee){while(--_0x3043ee){_0x1ac595['push'](_0x1ac595['shift']());}};_0x455fff(++_0x5d2081);}(_0x6dc2,0x116));var _0x26dc=function(_0x2454f3,_0xfd4265){_0x2454f3=_0x2454f3-0x0;var _0x26404c=_0x6dc2[_0x2454f3];return _0x26404c;};'use strict';var nodemailer=require(_0x26dc('0x0'));var inlineBase64=require('nodemailer-plugin-inline-base64');function EmailSmtp(){}EmailSmtp[_0x26dc('0x1')]['send']=function(_0x2f244c,_0x20e328){return new Promise(function(_0x194fc0,_0x208a17){var _0x833263=nodemailer[_0x26dc('0x2')](_0x2f244c);_0x833263[_0x26dc('0x3')](_0x26dc('0x4'),inlineBase64());_0x833263['sendMail'](_0x20e328,function(_0x44a404,_0x1354d5){if(_0x44a404){_0x208a17(_0x44a404[_0x26dc('0x5')]());}else{_0x194fc0(_0x1354d5);}});});};EmailSmtp[_0x26dc('0x1')][_0x26dc('0x6')]=function(_0x589454){return new Promise(function(_0x273f64,_0x1f58e7){var _0x4ce3e9=nodemailer['createTransport'](_0x589454);_0x4ce3e9['verify'](function(_0x83a6f,_0x7bf71f){if(_0x83a6f){_0x1f58e7(_0x83a6f['toString']());}else{if(_0x7bf71f){_0x273f64(_0x7bf71f);}else{_0x1f58e7(_0x26dc('0x7'));}}});});};module[_0x26dc('0x8')]=EmailSmtp;