diff --git a/LiMan.Api/Controllers/LicenzaController.cs b/LiMan.Api/Controllers/LicenzaController.cs index 243f3c5..68dda1c 100644 --- a/LiMan.Api/Controllers/LicenzaController.cs +++ b/LiMan.Api/Controllers/LicenzaController.cs @@ -41,11 +41,11 @@ namespace LiMan.APi.Controllers /// /// Recupera dati Licenza Applicativa (id licenza + num utenze) dati cliente + programma + licenza ATTUALE - /// + /// /// GET api/licenza/id?CodApp=xxx&Chiave=yyyy /// /// Codice cliente/Installazione - /// Codice Applicazione + /// Codice Applicazione /// Chiave licenza da validare /// [HttpGet("{id}")] @@ -99,13 +99,36 @@ namespace LiMan.APi.Controllers string msgTopic = "LiMan: verifica Licenze in scadenza"; // invio email - await sendEmail(msgTopic, msgBody.Replace($"{Environment.NewLine}", "")); + string destList = _configuration["MailDest:ExpiryNotify"]; + await sendEmailExpiry(destList, msgTopic, msgBody.Replace($"{Environment.NewLine}", "")); // ritorno solo LOG azioni answ = $"Scadute {numScadute} | Settimana: {numWeek} | Mese: {numMonth} | Trimestre: {numTrim}"; return answ; } + /// + /// Effettua test invio email + /// + /// + [HttpGet("test-email")] + public async Task TestEmail() + { + // oggetti base + string answ = "ND"; + string msgBody = "Prova invio email a destinatari MailDest:ExpiryNotify"; + // predispongo email + string msgTopic = "LiMan: Test invio email!"; + + // invio email + string destList = _configuration["MailDest:ExpiryNotify"]; + await sendEmailExpiry(destList, msgTopic, msgBody.Replace($"{Environment.NewLine}", "")); + + // ritorno solo LOG azioni + answ = $"Test effettuato!"; + return answ; + } + /// POST api/licenza /// /// Recupera dati Licenza Applicativa (id licenza + num utenze) dati cliente + programma + @@ -211,30 +234,36 @@ namespace LiMan.APi.Controllers if (elencoLicenze.Count == 0) { doLog($" - nessuna", logType.info, ref sbMain); - } - else { - foreach (var item in elencoLicenze) + else { - doLog($" - {item.Scadenza:yyyy.MM.dd} | {item.CodInst} | {item.Descrizione}", logType.info, ref sbMain); - } + foreach (var item in elencoLicenze) + { + doLog($" - {item.Scadenza:yyyy.MM.dd} | {item.CodInst} | {item.Descrizione}", logType.info, ref sbMain); + } } doLog("", logType.none, ref sbMain); doLog("", logType.none, ref sbMain); return sbMain.ToString(); } - protected async Task sendEmail(string subject, string message) + /// + /// Invio email a lista ExpiryNotify + /// + /// Elenco destinatari comma separated + /// Oggetto Email + /// MEssaggio + /// + protected async Task sendEmailExpiry(string destList, string subject, string message) { - string emailRaw = _configuration["MailDest:ExpiryNotify"]; - List emailDestList = emailRaw.Split(",").ToList(); + List emailDestList = destList.Split(",").ToList(); foreach (var dest in emailDestList) { try { await _emailSender.SendEmailAsync(dest, subject, message); } - catch(Exception exc) + catch (Exception exc) { Log.Error($"Eccezione durante invio email:{Environment.NewLine}dest: {dest} | subject {subject}{Environment.NewLine}{exc}"); } diff --git a/LiMan.Api/Resources/ChangeLog.html b/LiMan.Api/Resources/ChangeLog.html index cdd2b5e..f042f5e 100644 --- a/LiMan.Api/Resources/ChangeLog.html +++ b/LiMan.Api/Resources/ChangeLog.html @@ -1,6 +1,6 @@ License Manager - Versione: 2.1.2501.1611 + Versione: 2.1.2501.1612 Note di rilascio: diff --git a/LiMan.Api/Resources/VersNum.txt b/LiMan.Api/Resources/VersNum.txt index 7509d77..c353207 100644 --- a/LiMan.Api/Resources/VersNum.txt +++ b/LiMan.Api/Resources/VersNum.txt @@ -1 +1 @@ -2.1.2501.1611 +2.1.2501.1612 diff --git a/LiMan.Api/Resources/manifest.xml b/LiMan.Api/Resources/manifest.xml index c12d99e..91a73f5 100644 --- a/LiMan.Api/Resources/manifest.xml +++ b/LiMan.Api/Resources/manifest.xml @@ -1,6 +1,6 @@ - 2.1.2501.1611 + 2.1.2501.1612 https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html false diff --git a/LiMan.Api/appsettings.json b/LiMan.Api/appsettings.json index 3b8953e..97c8af8 100644 --- a/LiMan.Api/appsettings.json +++ b/LiMan.Api/appsettings.json @@ -18,8 +18,8 @@ "Address": "smtp.gmail.com", "Port": "587", "Account": "services@steamware.net", - "Password": "vpsad24068!", - "SenderEmail": "sservices@steamware.net", + "Password": "vpsad24068", + "SenderEmail": "services@steamware.net", "SenderName": "Steamware Email BOT" } } diff --git a/LiMan.DB/Controllers/DbController.cs b/LiMan.DB/Controllers/DbController.cs index 6ca1e34..19112e5 100644 --- a/LiMan.DB/Controllers/DbController.cs +++ b/LiMan.DB/Controllers/DbController.cs @@ -1447,7 +1447,7 @@ namespace LiMan.DB.Controllers } catch (Exception ex) { - Log.Error($"Eccezoine in InstallRelClean{Environment.NewLine}{ex}"); + Log.Error($"Eccezione in InstallRelClean | CodImp: {CodImp} | AppKey: {AppKey} | ListCodApp #: {ListCodApp.Count}{Environment.NewLine}{ex}"); } } } @@ -1520,7 +1520,7 @@ namespace LiMan.DB.Controllers } catch (Exception ex) { - Log.Error($"Eccezoine in InstallRelHistSnapshot{Environment.NewLine}{ex}"); + Log.Error($"Eccezione in InstallRelHistSnapshot{Environment.NewLine}{ex}"); } } return fatto; @@ -1587,7 +1587,7 @@ namespace LiMan.DB.Controllers } catch (Exception ex) { - Log.Error($"Eccezoine in InstallRelUpsert{Environment.NewLine}{ex}"); + Log.Error($"Eccezione in InstallRelUpsert | IdxLic: {upRec.IdxLic} | CodApp: {upRec.CodApp} | VersNum: {upRec.VersNum} {Environment.NewLine}{ex}"); } } return fatto; diff --git a/LiMan.UI/Components/UserMan.razor b/LiMan.UI/Components/UserMan.razor index 8e5e333..db63488 100644 --- a/LiMan.UI/Components/UserMan.razor +++ b/LiMan.UI/Components/UserMan.razor @@ -102,17 +102,24 @@ User Administration - - - - --- Tutti --- - @foreach (var item in RolesList) - { - - @item.Ruolo - - } - + + + + + + --- Tutti --- + @foreach (var item in RolesList) + { + + @item.Ruolo + + } + + + + @* + Test Email Send + *@ diff --git a/LiMan.UI/LiMan.UI.csproj b/LiMan.UI/LiMan.UI.csproj index 08782ed..ac4c83e 100644 --- a/LiMan.UI/LiMan.UI.csproj +++ b/LiMan.UI/LiMan.UI.csproj @@ -2,7 +2,7 @@ net6.0 - 2.1.2501.1611 + 2.1.2501.1612 LiMan.UI LiMan.UI diff --git a/LiMan.UI/Resources/ChangeLog.html b/LiMan.UI/Resources/ChangeLog.html index cdd2b5e..f042f5e 100644 --- a/LiMan.UI/Resources/ChangeLog.html +++ b/LiMan.UI/Resources/ChangeLog.html @@ -1,6 +1,6 @@ License Manager - Versione: 2.1.2501.1611 + Versione: 2.1.2501.1612 Note di rilascio: diff --git a/LiMan.UI/Resources/VersNum.txt b/LiMan.UI/Resources/VersNum.txt index 7509d77..c353207 100644 --- a/LiMan.UI/Resources/VersNum.txt +++ b/LiMan.UI/Resources/VersNum.txt @@ -1 +1 @@ -2.1.2501.1611 +2.1.2501.1612 diff --git a/LiMan.UI/Resources/manifest.xml b/LiMan.UI/Resources/manifest.xml index c12d99e..91a73f5 100644 --- a/LiMan.UI/Resources/manifest.xml +++ b/LiMan.UI/Resources/manifest.xml @@ -1,6 +1,6 @@ - 2.1.2501.1611 + 2.1.2501.1612 https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html false diff --git a/LiMan.UI/appsettings.json b/LiMan.UI/appsettings.json index 6d8113a..3ffb87c 100644 --- a/LiMan.UI/appsettings.json +++ b/LiMan.UI/appsettings.json @@ -25,8 +25,8 @@ "Address": "smtp.gmail.com", "Port": "587", "Account": "services@steamware.net", - "Password": "vpsad24068!", - "SenderEmail": "sservices@steamware.net", + "Password": "vpsad24068", + "SenderEmail": "services@steamware.net", "SenderName": "Steamware Email BOT" } }