Built motion from commit 06a208af.|2.6.26
[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 _0x6d0a=['createTransport','use','compile','sendMail','verify','toString','exports','nodemailer-plugin-inline-base64','prototype','send'];(function(_0x4e697a,_0x56a14b){var _0x88850c=function(_0x4e368a){while(--_0x4e368a){_0x4e697a['push'](_0x4e697a['shift']());}};_0x88850c(++_0x56a14b);}(_0x6d0a,0x75));var _0xa6d0=function(_0x160c73,_0x2ee678){_0x160c73=_0x160c73-0x0;var _0xd9302=_0x6d0a[_0x160c73];return _0xd9302;};'use strict';var nodemailer=require('nodemailer');var inlineBase64=require(_0xa6d0('0x0'));function EmailSmtp(){}EmailSmtp[_0xa6d0('0x1')][_0xa6d0('0x2')]=function(_0x188cf2,_0x798105){return new Promise(function(_0x385379,_0x2cf00a){var _0x46d248=nodemailer[_0xa6d0('0x3')](_0x188cf2);_0x46d248[_0xa6d0('0x4')](_0xa6d0('0x5'),inlineBase64());_0x46d248[_0xa6d0('0x6')](_0x798105,function(_0x28d106,_0x2310c9){if(_0x28d106){_0x2cf00a(_0x28d106['toString']());}else{_0x385379(_0x2310c9);}});});};EmailSmtp['prototype'][_0xa6d0('0x7')]=function(_0x5d3538){return new Promise(function(_0x3a62d7,_0x2d96bf){var _0x4de0bb=nodemailer[_0xa6d0('0x3')](_0x5d3538);_0x4de0bb[_0xa6d0('0x7')](function(_0x21ddc2,_0x29bbe9){if(_0x21ddc2){_0x2d96bf(_0x21ddc2[_0xa6d0('0x8')]());}else{if(_0x29bbe9){_0x3a62d7(_0x29bbe9);}else{_0x2d96bf('Not\x20verifired');}}});});};module[_0xa6d0('0x9')]=EmailSmtp;