Built motion from commit (unavailable).|2.2.0
[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 _0x7b64=['toString','verify','Not\x20verifired','nodemailer','bluebird','nodemailer-plugin-inline-base64','prototype','send','createTransport','use','compile','sendMail'];(function(_0x385eb1,_0x497a94){var _0x5d40eb=function(_0x159029){while(--_0x159029){_0x385eb1['push'](_0x385eb1['shift']());}};_0x5d40eb(++_0x497a94);}(_0x7b64,0xcf));var _0x47b6=function(_0x4bc9c5,_0x4390ec){_0x4bc9c5=_0x4bc9c5-0x0;var _0x7c0511=_0x7b64[_0x4bc9c5];return _0x7c0511;};'use strict';var nodemailer=require(_0x47b6('0x0'));var BPromise=require(_0x47b6('0x1'));var inlineBase64=require(_0x47b6('0x2'));function EmailSmtp(){}EmailSmtp[_0x47b6('0x3')][_0x47b6('0x4')]=function(_0x5add69,_0x174f23){return new BPromise(function(_0x46ccdf,_0x5b9e31){var _0x5aecbd=nodemailer[_0x47b6('0x5')](_0x5add69);_0x5aecbd[_0x47b6('0x6')](_0x47b6('0x7'),inlineBase64());_0x5aecbd[_0x47b6('0x8')](_0x174f23,function(_0x29b23d,_0x1dd265){if(_0x29b23d){_0x5b9e31(_0x29b23d[_0x47b6('0x9')]());}else{_0x46ccdf(_0x1dd265);}});});};EmailSmtp[_0x47b6('0x3')][_0x47b6('0xa')]=function(_0xbf9bec){return new BPromise(function(_0x438c17,_0x532c08){var _0x27ccbb=nodemailer[_0x47b6('0x5')](_0xbf9bec);_0x27ccbb[_0x47b6('0xa')](function(_0x576d66,_0x54cb5a){if(_0x576d66){_0x532c08(_0x576d66[_0x47b6('0x9')]());}else{if(_0x54cb5a){_0x438c17(_0x54cb5a);}else{_0x532c08(_0x47b6('0xb'));}}});});};module['exports']=EmailSmtp;