Built motion from commit (unavailable).|2.5.24
[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 _0x916a=['send','createTransport','use','compile','sendMail','toString','verify','nodemailer','bluebird','nodemailer-plugin-inline-base64','prototype'];(function(_0x452ff3,_0x40f928){var _0x288fec=function(_0x913a10){while(--_0x913a10){_0x452ff3['push'](_0x452ff3['shift']());}};_0x288fec(++_0x40f928);}(_0x916a,0xac));var _0xa916=function(_0x212fcc,_0x1a8867){_0x212fcc=_0x212fcc-0x0;var _0x4d8190=_0x916a[_0x212fcc];return _0x4d8190;};'use strict';var nodemailer=require(_0xa916('0x0'));var BPromise=require(_0xa916('0x1'));var inlineBase64=require(_0xa916('0x2'));function EmailSmtp(){}EmailSmtp[_0xa916('0x3')][_0xa916('0x4')]=function(_0x34370f,_0x55eac2){return new BPromise(function(_0xa547c5,_0x4f9b3d){var _0x35e67c=nodemailer[_0xa916('0x5')](_0x34370f);_0x35e67c[_0xa916('0x6')](_0xa916('0x7'),inlineBase64());_0x35e67c[_0xa916('0x8')](_0x55eac2,function(_0x4ededb,_0x228cd3){if(_0x4ededb){_0x4f9b3d(_0x4ededb[_0xa916('0x9')]());}else{_0xa547c5(_0x228cd3);}});});};EmailSmtp['prototype']['verify']=function(_0x1501c4){return new BPromise(function(_0x511905,_0x22a4e5){var _0x11bd5f=nodemailer[_0xa916('0x5')](_0x1501c4);_0x11bd5f[_0xa916('0xa')](function(_0x4426a0,_0x2d1b63){if(_0x4426a0){_0x22a4e5(_0x4426a0[_0xa916('0x9')]());}else{if(_0x2d1b63){_0x511905(_0x2d1b63);}else{_0x22a4e5('Not\x20verifired');}}});});};module['exports']=EmailSmtp;