Built motion from commit (unavailable).|2.5.1
[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 _0xaeca=['sendMail','toString','Not\x20verifired','exports','nodemailer','bluebird','nodemailer-plugin-inline-base64','prototype','send','createTransport','compile'];(function(_0x3b5250,_0x7a0b2c){var _0xc844a1=function(_0x2fbc98){while(--_0x2fbc98){_0x3b5250['push'](_0x3b5250['shift']());}};_0xc844a1(++_0x7a0b2c);}(_0xaeca,0xb4));var _0xaaec=function(_0x5d240d,_0x22e0e0){_0x5d240d=_0x5d240d-0x0;var _0x59701e=_0xaeca[_0x5d240d];return _0x59701e;};'use strict';var nodemailer=require(_0xaaec('0x0'));var BPromise=require(_0xaaec('0x1'));var inlineBase64=require(_0xaaec('0x2'));function EmailSmtp(){}EmailSmtp[_0xaaec('0x3')][_0xaaec('0x4')]=function(_0x3f9e9f,_0x57a3a8){return new BPromise(function(_0x158eed,_0x4ec841){var _0xa8fd2c=nodemailer[_0xaaec('0x5')](_0x3f9e9f);_0xa8fd2c['use'](_0xaaec('0x6'),inlineBase64());_0xa8fd2c[_0xaaec('0x7')](_0x57a3a8,function(_0xe098c0,_0x52019b){if(_0xe098c0){_0x4ec841(_0xe098c0['toString']());}else{_0x158eed(_0x52019b);}});});};EmailSmtp[_0xaaec('0x3')]['verify']=function(_0x2a2849){return new BPromise(function(_0x3a9996,_0x24b5c8){var _0x29a8ea=nodemailer[_0xaaec('0x5')](_0x2a2849);_0x29a8ea['verify'](function(_0x3b78f1,_0xf488dc){if(_0x3b78f1){_0x24b5c8(_0x3b78f1[_0xaaec('0x8')]());}else{if(_0xf488dc){_0x3a9996(_0xf488dc);}else{_0x24b5c8(_0xaaec('0x9'));}}});});};module[_0xaaec('0xa')]=EmailSmtp;