Built motion from commit (unavailable).|2.4.21
[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 _0x27a9=['createTransport','sendMail','prototype','verify','toString','Not\x20verifired','exports','nodemailer','nodemailer-plugin-inline-base64','send'];(function(_0xe73aa8,_0x2c987b){var _0xb99d1e=function(_0x3d1c03){while(--_0x3d1c03){_0xe73aa8['push'](_0xe73aa8['shift']());}};_0xb99d1e(++_0x2c987b);}(_0x27a9,0x101));var _0x927a=function(_0x1f2be7,_0x55f91b){_0x1f2be7=_0x1f2be7-0x0;var _0x221ec6=_0x27a9[_0x1f2be7];return _0x221ec6;};'use strict';var nodemailer=require(_0x927a('0x0'));var BPromise=require('bluebird');var inlineBase64=require(_0x927a('0x1'));function EmailSmtp(){}EmailSmtp['prototype'][_0x927a('0x2')]=function(_0x3c5e75,_0x284167){return new BPromise(function(_0x548ec7,_0x14f285){var _0x29a201=nodemailer[_0x927a('0x3')](_0x3c5e75);_0x29a201['use']('compile',inlineBase64());_0x29a201[_0x927a('0x4')](_0x284167,function(_0x471f8d,_0x3cdda6){if(_0x471f8d){_0x14f285(_0x471f8d['toString']());}else{_0x548ec7(_0x3cdda6);}});});};EmailSmtp[_0x927a('0x5')][_0x927a('0x6')]=function(_0x306dfb){return new BPromise(function(_0x459d83,_0x4d044f){var _0x26327f=nodemailer[_0x927a('0x3')](_0x306dfb);_0x26327f[_0x927a('0x6')](function(_0x24234c,_0x3f14af){if(_0x24234c){_0x4d044f(_0x24234c[_0x927a('0x7')]());}else{if(_0x3f14af){_0x459d83(_0x3f14af);}else{_0x4d044f(_0x927a('0x8'));}}});});};module[_0x927a('0x9')]=EmailSmtp;