From ae1e972849bd1863afc8f89bfd412d2ba3416dd8 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 19 Jan 2024 21:35:57 -0800 Subject: [PATCH] fixup! New: Option to disable Email encryption Closes #6380 --- .../Datastore/Migration/201_email_encryptionFixture.cs | 2 +- src/NzbDrone.Core/Localization/Core/en.json | 2 +- src/NzbDrone.Core/Notifications/Email/EmailSettings.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core.Test/Datastore/Migration/201_email_encryptionFixture.cs b/src/NzbDrone.Core.Test/Datastore/Migration/201_email_encryptionFixture.cs index e422d1782..ed93aa321 100644 --- a/src/NzbDrone.Core.Test/Datastore/Migration/201_email_encryptionFixture.cs +++ b/src/NzbDrone.Core.Test/Datastore/Migration/201_email_encryptionFixture.cs @@ -44,7 +44,7 @@ namespace NzbDrone.Core.Test.Datastore.Migration items.Should().HaveCount(1); items.First().Implementation.Should().Be("Email"); items.First().ConfigContract.Should().Be("EmailSettings"); - items.First().Settings.UseEncryption.Should().Be((int)EmailEncryptionType.Auto); + items.First().Settings.UseEncryption.Should().Be((int)EmailEncryptionType.Optimistically); } [Test] diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index c4bd85fe0..cff9c6b71 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -1261,7 +1261,7 @@ "NotificationsEmailSettingsServer": "Server", "NotificationsEmailSettingsServerHelpText": "Hostname or IP of Email server", "NotificationsEmailSettingsUseEncryption": "Use Encryption", - "NotificationsEmailSettingsUseEncryptionHelpText": "Whether to automatically detect encyption support, to always encryption via SSL (Port 465 only) or StartTLS (any other port) or to never use encryption", + "NotificationsEmailSettingsUseEncryptionHelpText": "Whether to optimistically use encryption if configured on the server, to always use encryption via SSL (Port 465 only) or StartTLS (any other port) or to never use encryption", "NotificationsEmbySettingsSendNotifications": "Send Notifications", "NotificationsEmbySettingsSendNotificationsHelpText": "Have MediaBrowser send notifications to configured providers", "NotificationsEmbySettingsUpdateLibraryHelpText": "Update Library on Import, Rename, or Delete?", diff --git a/src/NzbDrone.Core/Notifications/Email/EmailSettings.cs b/src/NzbDrone.Core/Notifications/Email/EmailSettings.cs index 884c41d5a..cdc259c78 100644 --- a/src/NzbDrone.Core/Notifications/Email/EmailSettings.cs +++ b/src/NzbDrone.Core/Notifications/Email/EmailSettings.cs @@ -45,7 +45,7 @@ namespace NzbDrone.Core.Notifications.Email [FieldDefinition(1, Label = "Port")] public int Port { get; set; } - [FieldDefinition(2, Label = "NotificationsEmailSettingsRequireEncryption", HelpText = "NotificationsEmailSettingsRequireEncryptionHelpText", Type = FieldType.Select, SelectOptions = typeof(EmailEncryptionType))] + [FieldDefinition(2, Label = "NotificationsEmailSettingsUseEncryption", HelpText = "NotificationsEmailSettingsUseEncryptionHelpText", Type = FieldType.Select, SelectOptions = typeof(EmailEncryptionType))] public int UseEncryption { get; set; } [FieldDefinition(3, Label = "Username", Privacy = PrivacyLevel.UserName)] @@ -74,7 +74,7 @@ namespace NzbDrone.Core.Notifications.Email public enum EmailEncryptionType { - Auto = 0, + Optimistically = 0, Always = 1, Never = 2 }