Built motion from commit (unavailable).|2.5.6
[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 _0xccf3=['use','compile','sendMail','verify','toString','Not\x20verifired','exports','nodemailer','bluebird','nodemailer-plugin-inline-base64','prototype','createTransport'];(function(_0x38d37c,_0x5c2d9a){var _0x5322ad=function(_0x27246f){while(--_0x27246f){_0x38d37c['push'](_0x38d37c['shift']());}};_0x5322ad(++_0x5c2d9a);}(_0xccf3,0x97));var _0x3ccf=function(_0x4ee4fc,_0x3c11ff){_0x4ee4fc=_0x4ee4fc-0x0;var _0x4ce6bf=_0xccf3[_0x4ee4fc];return _0x4ce6bf;};'use strict';var nodemailer=require(_0x3ccf('0x0'));var BPromise=require(_0x3ccf('0x1'));var inlineBase64=require(_0x3ccf('0x2'));function EmailSmtp(){}EmailSmtp[_0x3ccf('0x3')]['send']=function(_0x1fba1a,_0x2abc37){return new BPromise(function(_0x30c838,_0x6f59a1){var _0x581764=nodemailer[_0x3ccf('0x4')](_0x1fba1a);_0x581764[_0x3ccf('0x5')](_0x3ccf('0x6'),inlineBase64());_0x581764[_0x3ccf('0x7')](_0x2abc37,function(_0x5edd91,_0x10f78d){if(_0x5edd91){_0x6f59a1(_0x5edd91['toString']());}else{_0x30c838(_0x10f78d);}});});};EmailSmtp[_0x3ccf('0x3')][_0x3ccf('0x8')]=function(_0x3aed5f){return new BPromise(function(_0x1d9552,_0x83b42a){var _0x217814=nodemailer[_0x3ccf('0x4')](_0x3aed5f);_0x217814[_0x3ccf('0x8')](function(_0x16af6a,_0x193207){if(_0x16af6a){_0x83b42a(_0x16af6a[_0x3ccf('0x9')]());}else{if(_0x193207){_0x1d9552(_0x193207);}else{_0x83b42a(_0x3ccf('0xa'));}}});});};module[_0x3ccf('0xb')]=EmailSmtp;