Built motion from commit (unavailable).|2.5.4
[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 _0xf79b=['createTransport','compile','sendMail','toString','verify','Not\x20verifired','exports','nodemailer','bluebird'];(function(_0x34cc65,_0x1afeea){var _0x25674a=function(_0x4e7206){while(--_0x4e7206){_0x34cc65['push'](_0x34cc65['shift']());}};_0x25674a(++_0x1afeea);}(_0xf79b,0x10c));var _0xbf79=function(_0x4be337,_0x1209a5){_0x4be337=_0x4be337-0x0;var _0x2871f8=_0xf79b[_0x4be337];return _0x2871f8;};'use strict';var nodemailer=require(_0xbf79('0x0'));var BPromise=require(_0xbf79('0x1'));var inlineBase64=require('nodemailer-plugin-inline-base64');function EmailSmtp(){}EmailSmtp['prototype']['send']=function(_0x2b70b0,_0x54dada){return new BPromise(function(_0x43fd91,_0x31bcfc){var _0x1e998d=nodemailer[_0xbf79('0x2')](_0x2b70b0);_0x1e998d['use'](_0xbf79('0x3'),inlineBase64());_0x1e998d[_0xbf79('0x4')](_0x54dada,function(_0x40ad4b,_0x5bf228){if(_0x40ad4b){_0x31bcfc(_0x40ad4b[_0xbf79('0x5')]());}else{_0x43fd91(_0x5bf228);}});});};EmailSmtp['prototype'][_0xbf79('0x6')]=function(_0x290e87){return new BPromise(function(_0x40b39c,_0x3c6c39){var _0x2c4b65=nodemailer[_0xbf79('0x2')](_0x290e87);_0x2c4b65[_0xbf79('0x6')](function(_0x379375,_0x5d4158){if(_0x379375){_0x3c6c39(_0x379375['toString']());}else{if(_0x5d4158){_0x40b39c(_0x5d4158);}else{_0x3c6c39(_0xbf79('0x7'));}}});});};module[_0xbf79('0x8')]=EmailSmtp;