Built motion from commit 3e059bc2.|2.5.32
[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 _0x6373=['nodemailer','bluebird','nodemailer-plugin-inline-base64','prototype','send','createTransport','use','compile','sendMail','verify','toString','Not\x20verifired','exports'];(function(_0x34c825,_0x44cad4){var _0x2fde13=function(_0x5ba245){while(--_0x5ba245){_0x34c825['push'](_0x34c825['shift']());}};_0x2fde13(++_0x44cad4);}(_0x6373,0x82));var _0x3637=function(_0x2969a2,_0x2e02fe){_0x2969a2=_0x2969a2-0x0;var _0x30fccb=_0x6373[_0x2969a2];return _0x30fccb;};'use strict';var nodemailer=require(_0x3637('0x0'));var BPromise=require(_0x3637('0x1'));var inlineBase64=require(_0x3637('0x2'));function EmailSmtp(){}EmailSmtp[_0x3637('0x3')][_0x3637('0x4')]=function(_0xc6c1d5,_0x2c61d1){return new BPromise(function(_0x546517,_0x2df14c){var _0x542b58=nodemailer[_0x3637('0x5')](_0xc6c1d5);_0x542b58[_0x3637('0x6')](_0x3637('0x7'),inlineBase64());_0x542b58[_0x3637('0x8')](_0x2c61d1,function(_0x1feb22,_0x538fa1){if(_0x1feb22){_0x2df14c(_0x1feb22['toString']());}else{_0x546517(_0x538fa1);}});});};EmailSmtp[_0x3637('0x3')][_0x3637('0x9')]=function(_0x56e29e){return new BPromise(function(_0x3eac66,_0x499247){var _0x83c936=nodemailer['createTransport'](_0x56e29e);_0x83c936[_0x3637('0x9')](function(_0x2774fd,_0x8c948f){if(_0x2774fd){_0x499247(_0x2774fd[_0x3637('0xa')]());}else{if(_0x8c948f){_0x3eac66(_0x8c948f);}else{_0x499247(_0x3637('0xb'));}}});});};module[_0x3637('0xc')]=EmailSmtp;