From 4935f30ae0763c835a2f1fbdcad278dc3f444e38 Mon Sep 17 00:00:00 2001 From: Chen Xinyang Date: Tue, 22 Oct 2024 03:09:02 -0700 Subject: [PATCH] Fixes mail header encoding issues with MimeKit For details see #441 --- Wino.Server/App.xaml.cs | 3 +++ Wino.Server/Wino.Server.csproj | 1 + 2 files changed, 4 insertions(+) diff --git a/Wino.Server/App.xaml.cs b/Wino.Server/App.xaml.cs index c41c51dc..d65ac169 100644 --- a/Wino.Server/App.xaml.cs +++ b/Wino.Server/App.xaml.cs @@ -150,6 +150,9 @@ protected override async void OnStartup(StartupEventArgs e) if (isCreatedNew) { + // Ensure proper encodings are available for MimeKit + System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); + // Spawn a thread which will be waiting for our event var thread = new Thread(() => { diff --git a/Wino.Server/Wino.Server.csproj b/Wino.Server/Wino.Server.csproj index 2d137c8e..8b81de78 100644 --- a/Wino.Server/Wino.Server.csproj +++ b/Wino.Server/Wino.Server.csproj @@ -33,6 +33,7 @@ +