From 93fd4e61ad82c3ec46c522f471832d3e0cc4b422 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 20 Sep 2026 21:06:02 +0100 Subject: [PATCH] code cleaup --- contrib/template.service | 2 -- src/Yavsc.Org.Tests/MarkdownTests.cs | 34 ------------------------- src/Yavsc.Server/Services/MailSender.cs | 4 +++ 3 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 src/Yavsc.Org.Tests/MarkdownTests.cs diff --git a/contrib/template.service b/contrib/template.service index 38ba2c82a..3959c7151 100644 --- a/contrib/template.service +++ b/contrib/template.service @@ -29,8 +29,6 @@ Environment="ASPNETCORE_Smtp__Password=\"$ASPNETCORE_Smtp__Password\"" CapabilityBoundingSet=CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_BIND_SERVICE -StandardOutput=syslog -StandardError=syslog SyslogIdentifier=$APP_SYSLOG_ID [Install] diff --git a/src/Yavsc.Org.Tests/MarkdownTests.cs b/src/Yavsc.Org.Tests/MarkdownTests.cs deleted file mode 100644 index 1bd0db9c5..000000000 --- a/src/Yavsc.Org.Tests/MarkdownTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -using DotMarkdown.Linq; -using Markdig; -using Xunit; -using static DotMarkdown.Linq.MFactory; - - -public class MarkdownTests -{ - [Fact] - public void TestMarkdownRendering() - { - MDocument document = Document( - Heading1("Markdown Sample"), - Heading2("Bullet List"), - BulletList( - "text", - Bold("bold text")), - HorizontalRule(), - Heading2("IndentedCodeBlock"), - IndentedCodeBlock("string s = null;")); - - Console.WriteLine(document.ToString()); - - } - - [Fact] - public void TestAnotherMarkdownRendering() - { - var result = Markdown.ToHtml("This is a text with some *emphasis*"); - - - Console.WriteLine(result); - } -} diff --git a/src/Yavsc.Server/Services/MailSender.cs b/src/Yavsc.Server/Services/MailSender.cs index 81518eddb..9a6c60ed9 100644 --- a/src/Yavsc.Server/Services/MailSender.cs +++ b/src/Yavsc.Server/Services/MailSender.cs @@ -140,6 +140,10 @@ namespace Yavsc.Services catch (FormatException ex) { logger.LogError(ex, "Refusing to send email because the recipient or sender address is malformed. To={To}, From={From}", email, siteSettings.Owner.EMail); + logger.LogError(ex.Message); + if (ex.InnerException!=null) + logger.LogError(ex.InnerException.Message); + return string.Empty; } catch (SmtpCommandException ex)