1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0x57ab=['define','custom','service','provider','host','Smtp','port','secure','authentication','modernAuthentication','auth','user','CloudProvider','data5','./mailAccount.attributes','exports'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x57ab,0x7e));var _0xb57a=function(_0x30cfcc,_0x340db8){_0x30cfcc=_0x30cfcc-0x0;var _0x28691f=_0x57ab[_0x30cfcc];return _0x28691f;};'use strict';var attributes=require(_0xb57a('0x0'));module[_0xb57a('0x1')]=function(_0x3b58d0){return _0x3b58d0[_0xb57a('0x2')]('MailAccount',attributes,{'tableName':'mail_accounts','paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x28d851=this;var _0x454d76={'id':_0x28d851['id'],'tls':{'rejectUnauthorized':![]}};if(_0x28d851['provider']!==_0xb57a('0x3')){_0x454d76[_0xb57a('0x4')]=_0x28d851[_0xb57a('0x5')];}else{_0x454d76[_0xb57a('0x6')]=_0x28d851[_0xb57a('0x7')]['host'];_0x454d76[_0xb57a('0x8')]=_0x28d851[_0xb57a('0x7')][_0xb57a('0x8')];_0x454d76['secure']=_0x28d851[_0xb57a('0x7')][_0xb57a('0x9')];}if(_0x28d851[_0xb57a('0x7')][_0xb57a('0xa')]){if(_0x28d851[_0xb57a('0x7')][_0xb57a('0xb')]){if(!_0x28d851[_0xb57a('0x7')]['CloudProvider'])throw new Error('Cloud\x20Provider\x20configuration\x20not\x20found');_0x454d76[_0xb57a('0xc')]={'type':'OAuth2','user':_0x28d851[_0xb57a('0x7')][_0xb57a('0xd')],'accessToken':_0x28d851[_0xb57a('0x7')][_0xb57a('0xe')][_0xb57a('0xf')]};}else{_0x454d76[_0xb57a('0xc')]={'user':_0x28d851[_0xb57a('0x7')][_0xb57a('0xd')],'pass':_0x28d851['Smtp']['pass']};}}return _0x454d76;}}});};