Built motion from commit (unavailable).|2.4.11
[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 _0x18f2=['send','createTransport','use','compile','toString','verify','Not\x20verifired','nodemailer','bluebird','prototype'];(function(_0x303c30,_0x16edcb){var _0x43161b=function(_0x3330ff){while(--_0x3330ff){_0x303c30['push'](_0x303c30['shift']());}};_0x43161b(++_0x16edcb);}(_0x18f2,0xed));var _0x218f=function(_0x2fad1a,_0x4ba345){_0x2fad1a=_0x2fad1a-0x0;var _0x4d8a27=_0x18f2[_0x2fad1a];return _0x4d8a27;};'use strict';var nodemailer=require(_0x218f('0x0'));var BPromise=require(_0x218f('0x1'));var inlineBase64=require('nodemailer-plugin-inline-base64');function EmailSmtp(){}EmailSmtp[_0x218f('0x2')][_0x218f('0x3')]=function(_0x392945,_0x343a15){return new BPromise(function(_0x233f21,_0x15cb40){var _0x30ab4b=nodemailer[_0x218f('0x4')](_0x392945);_0x30ab4b[_0x218f('0x5')](_0x218f('0x6'),inlineBase64());_0x30ab4b['sendMail'](_0x343a15,function(_0x15c1d1,_0x45f8f6){if(_0x15c1d1){_0x15cb40(_0x15c1d1[_0x218f('0x7')]());}else{_0x233f21(_0x45f8f6);}});});};EmailSmtp['prototype'][_0x218f('0x8')]=function(_0x4f990f){return new BPromise(function(_0x4f3693,_0x5858a0){var _0x29fce7=nodemailer[_0x218f('0x4')](_0x4f990f);_0x29fce7[_0x218f('0x8')](function(_0x2a3fda,_0x6d2b21){if(_0x2a3fda){_0x5858a0(_0x2a3fda[_0x218f('0x7')]());}else{if(_0x6d2b21){_0x4f3693(_0x6d2b21);}else{_0x5858a0(_0x218f('0x9'));}}});});};module['exports']=EmailSmtp;