Built motion from commit (unavailable).|2.4.3
[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 _0xf229=['nodemailer-plugin-inline-base64','send','createTransport','use','toString','prototype','verify'];(function(_0x56f745,_0x9cf373){var _0x530451=function(_0x4de3a0){while(--_0x4de3a0){_0x56f745['push'](_0x56f745['shift']());}};_0x530451(++_0x9cf373);}(_0xf229,0x77));var _0x9f22=function(_0x1935b8,_0x5d2c40){_0x1935b8=_0x1935b8-0x0;var _0x370f25=_0xf229[_0x1935b8];return _0x370f25;};'use strict';var nodemailer=require('nodemailer');var BPromise=require('bluebird');var inlineBase64=require(_0x9f22('0x0'));function EmailSmtp(){}EmailSmtp['prototype'][_0x9f22('0x1')]=function(_0xf8f96b,_0x3a3f36){return new BPromise(function(_0x462bb1,_0x4cc972){var _0x5d1267=nodemailer[_0x9f22('0x2')](_0xf8f96b);_0x5d1267[_0x9f22('0x3')]('compile',inlineBase64());_0x5d1267['sendMail'](_0x3a3f36,function(_0x347ebb,_0x38c4d7){if(_0x347ebb){_0x4cc972(_0x347ebb[_0x9f22('0x4')]());}else{_0x462bb1(_0x38c4d7);}});});};EmailSmtp[_0x9f22('0x5')][_0x9f22('0x6')]=function(_0x496dbc){return new BPromise(function(_0x148f81,_0x20ab93){var _0x5bfacb=nodemailer[_0x9f22('0x2')](_0x496dbc);_0x5bfacb[_0x9f22('0x6')](function(_0x3aaba0,_0x2f4686){if(_0x3aaba0){_0x20ab93(_0x3aaba0[_0x9f22('0x4')]());}else{if(_0x2f4686){_0x148f81(_0x2f4686);}else{_0x20ab93('Not\x20verifired');}}});});};module['exports']=EmailSmtp;