Built motion from commit (unavailable).|2.5.25
[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 _0xfbeb=['prototype','send','createTransport','use','compile','sendMail','verify','toString','Not\x20verifired','exports','nodemailer','bluebird','nodemailer-plugin-inline-base64'];(function(_0x2080a3,_0x48acfa){var _0x8d7d17=function(_0x2dbc06){while(--_0x2dbc06){_0x2080a3['push'](_0x2080a3['shift']());}};_0x8d7d17(++_0x48acfa);}(_0xfbeb,0xe7));var _0xbfbe=function(_0x23f3fe,_0x37a19c){_0x23f3fe=_0x23f3fe-0x0;var _0x1b1cb1=_0xfbeb[_0x23f3fe];return _0x1b1cb1;};'use strict';var nodemailer=require(_0xbfbe('0x0'));var BPromise=require(_0xbfbe('0x1'));var inlineBase64=require(_0xbfbe('0x2'));function EmailSmtp(){}EmailSmtp[_0xbfbe('0x3')][_0xbfbe('0x4')]=function(_0x11e3e4,_0x30a657){return new BPromise(function(_0x2dc648,_0x4b8f2a){var _0x32ba5a=nodemailer[_0xbfbe('0x5')](_0x11e3e4);_0x32ba5a[_0xbfbe('0x6')](_0xbfbe('0x7'),inlineBase64());_0x32ba5a[_0xbfbe('0x8')](_0x30a657,function(_0x5a0a1d,_0x4ed089){if(_0x5a0a1d){_0x4b8f2a(_0x5a0a1d['toString']());}else{_0x2dc648(_0x4ed089);}});});};EmailSmtp['prototype'][_0xbfbe('0x9')]=function(_0x226c1e){return new BPromise(function(_0x263774,_0x33f557){var _0x14db41=nodemailer[_0xbfbe('0x5')](_0x226c1e);_0x14db41['verify'](function(_0x249c94,_0x2381a4){if(_0x249c94){_0x33f557(_0x249c94[_0xbfbe('0xa')]());}else{if(_0x2381a4){_0x263774(_0x2381a4);}else{_0x33f557(_0xbfbe('0xb'));}}});});};module[_0xbfbe('0xc')]=EmailSmtp;