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 _0x511a=['provider','custom','service','host','Smtp','port','secure','modernAuthentication','CloudProvider','Cloud\x20Provider\x20configuration\x20not\x20found','OAuth2','user','data5','auth','pass','exports','define','MailAccount','mail_accounts'];(function(_0x5a5970,_0x467c50){var _0x493182=function(_0x3e85cd){while(--_0x3e85cd){_0x5a5970['push'](_0x5a5970['shift']());}};_0x493182(++_0x467c50);}(_0x511a,0x94));var _0xa511=function(_0x167db3,_0x43d0ee){_0x167db3=_0x167db3-0x0;var _0x4811dc=_0x511a[_0x167db3];return _0x4811dc;};'use strict';var attributes=require('./mailAccount.attributes');module[_0xa511('0x0')]=function(_0x6a439d){return _0x6a439d[_0xa511('0x1')](_0xa511('0x2'),attributes,{'tableName':_0xa511('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x58f537=this;var _0x4afeb0={'id':_0x58f537['id'],'tls':{'rejectUnauthorized':![]}};if(_0x58f537[_0xa511('0x4')]!==_0xa511('0x5')){_0x4afeb0[_0xa511('0x6')]=_0x58f537[_0xa511('0x4')];}else{_0x4afeb0[_0xa511('0x7')]=_0x58f537[_0xa511('0x8')]['host'];_0x4afeb0[_0xa511('0x9')]=_0x58f537[_0xa511('0x8')]['port'];_0x4afeb0['secure']=_0x58f537[_0xa511('0x8')][_0xa511('0xa')];}if(_0x58f537['Smtp']['authentication']){if(_0x58f537[_0xa511('0x8')][_0xa511('0xb')]){if(!_0x58f537[_0xa511('0x8')][_0xa511('0xc')])throw new Error(_0xa511('0xd'));_0x4afeb0['auth']={'type':_0xa511('0xe'),'user':_0x58f537[_0xa511('0x8')][_0xa511('0xf')],'accessToken':_0x58f537['Smtp'][_0xa511('0xc')][_0xa511('0x10')]};}else{_0x4afeb0[_0xa511('0x11')]={'user':_0x58f537['Smtp']['user'],'pass':_0x58f537[_0xa511('0x8')][_0xa511('0x12')]};}}return _0x4afeb0;}}});};