case 4310

This commit is contained in:
2022-11-21 01:22:31 +00:00
parent b9f80c6143
commit 36678e92b8
9 changed files with 16 additions and 7 deletions

View File

@@ -406,6 +406,7 @@ namespace AyaNova.Api.Controllers
TranslationKeysToFetch.Add("AdminEraseDatabase");
TranslationKeysToFetch.Add("EventResetSerial");
TranslationKeysToFetch.Add("EventUtilityFileDownload");
TranslationKeysToFetch.Add("NotifyEventDirectSMTPMessage");
var LT = await TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, translationId);
ReturnList.Add(new NameIdItem() { Name = LT["EventDeleted"], Id = (long)AyaEvent.Deleted });
@@ -423,6 +424,7 @@ namespace AyaNova.Api.Controllers
ReturnList.Add(new NameIdItem() { Name = LT["AdminEraseDatabase"], Id = (long)AyaEvent.EraseAllData });
ReturnList.Add(new NameIdItem() { Name = LT["EventResetSerial"], Id = (long)AyaEvent.ResetSerial });
ReturnList.Add(new NameIdItem() { Name = LT["EventUtilityFileDownload"], Id = (long)AyaEvent.UtilityFileDownload });
ReturnList.Add(new NameIdItem() { Name = LT["NotifyEventDirectSMTPMessage"], Id = (long)AyaEvent.DirectSMTP });
}
else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(AuthorizationRoles).ToString()).ToLowerInvariant())
{

View File

@@ -338,6 +338,7 @@ namespace AyaNova.Api.Controllers
try
{
await m.SendEmailAsync(notifyDirectSMTP.ToAddress, notifyDirectSMTP.Subject, notifyDirectSMTP.TextBody, ServerGlobalOpsSettingsCache.Notify, null, null, notifyDirectSMTP.HTMLBody);
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, notifyDirectSMTP.ObjectId, notifyDirectSMTP.AType, AyaEvent.DirectSMTP, $"{notifyDirectSMTP.Subject}->{notifyDirectSMTP.ToAddress}"), ct);
}
catch (Exception ex)
{