diff --git a/src/NzbDrone.Common/Lidarr.Common.csproj b/src/NzbDrone.Common/Lidarr.Common.csproj
index 60df278b7..97c67662d 100644
--- a/src/NzbDrone.Common/Lidarr.Common.csproj
+++ b/src/NzbDrone.Common/Lidarr.Common.csproj
@@ -5,7 +5,7 @@
ISMUSL
-
+
diff --git a/src/NzbDrone.Core/Lidarr.Core.csproj b/src/NzbDrone.Core/Lidarr.Core.csproj
index 572803e2c..311186b4f 100644
--- a/src/NzbDrone.Core/Lidarr.Core.csproj
+++ b/src/NzbDrone.Core/Lidarr.Core.csproj
@@ -13,7 +13,7 @@
-
+
@@ -23,7 +23,7 @@
-
+
diff --git a/src/NzbDrone.Core/MediaCover/ImageResizer.cs b/src/NzbDrone.Core/MediaCover/ImageResizer.cs
index ec2eefa78..c2f85c209 100644
--- a/src/NzbDrone.Core/MediaCover/ImageResizer.cs
+++ b/src/NzbDrone.Core/MediaCover/ImageResizer.cs
@@ -42,11 +42,9 @@ namespace NzbDrone.Core.MediaCover
try
{
- using (var image = Image.Load(source))
- {
- image.Mutate(x => x.Resize(0, height));
- image.Save(destination);
- }
+ using var image = Image.Load(source);
+ image.Mutate(x => x.Resize(0, height));
+ image.Save(destination);
}
catch
{
diff --git a/src/NzbDrone.Core/Notifications/Email/Email.cs b/src/NzbDrone.Core/Notifications/Email/Email.cs
index 15170fee2..1155b51f6 100644
--- a/src/NzbDrone.Core/Notifications/Email/Email.cs
+++ b/src/NzbDrone.Core/Notifications/Email/Email.cs
@@ -124,47 +124,45 @@ namespace NzbDrone.Core.Notifications.Email
private void Send(MimeMessage email, EmailSettings settings)
{
- using (var client = new SmtpClient())
+ using var client = new SmtpClient();
+ client.Timeout = 10000;
+
+ var serverOption = SecureSocketOptions.Auto;
+
+ if (settings.RequireEncryption)
{
- client.Timeout = 10000;
-
- var serverOption = SecureSocketOptions.Auto;
-
- if (settings.RequireEncryption)
+ if (settings.Port == 465)
{
- if (settings.Port == 465)
- {
- serverOption = SecureSocketOptions.SslOnConnect;
- }
- else
- {
- serverOption = SecureSocketOptions.StartTls;
- }
+ serverOption = SecureSocketOptions.SslOnConnect;
}
-
- client.ServerCertificateValidationCallback = _certificateValidationService.ShouldByPassValidationError;
-
- _logger.Debug("Connecting to mail server");
-
- client.Connect(settings.Server, settings.Port, serverOption);
-
- if (!string.IsNullOrWhiteSpace(settings.Username))
+ else
{
- _logger.Debug("Authenticating to mail server");
-
- client.Authenticate(settings.Username, settings.Password);
+ serverOption = SecureSocketOptions.StartTls;
}
-
- _logger.Debug("Sending to mail server");
-
- client.Send(email);
-
- _logger.Debug("Sent to mail server, disconnecting");
-
- client.Disconnect(true);
-
- _logger.Debug("Disconnecting from mail server");
}
+
+ client.ServerCertificateValidationCallback = _certificateValidationService.ShouldByPassValidationError;
+
+ _logger.Debug("Connecting to mail server");
+
+ client.Connect(settings.Server, settings.Port, serverOption);
+
+ if (!string.IsNullOrWhiteSpace(settings.Username))
+ {
+ _logger.Debug("Authenticating to mail server");
+
+ client.Authenticate(settings.Username, settings.Password);
+ }
+
+ _logger.Debug("Sending to mail server");
+
+ client.Send(email);
+
+ _logger.Debug("Sent to mail server, disconnecting");
+
+ client.Disconnect(true);
+
+ _logger.Debug("Disconnecting from mail server");
}
public ValidationFailure Test(EmailSettings settings)
diff --git a/src/NzbDrone.Host/Lidarr.Host.csproj b/src/NzbDrone.Host/Lidarr.Host.csproj
index 520c1f055..ad7b17209 100644
--- a/src/NzbDrone.Host/Lidarr.Host.csproj
+++ b/src/NzbDrone.Host/Lidarr.Host.csproj
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/src/NzbDrone.Update/Lidarr.Update.csproj b/src/NzbDrone.Update/Lidarr.Update.csproj
index ce0c5acfd..685e54612 100644
--- a/src/NzbDrone.Update/Lidarr.Update.csproj
+++ b/src/NzbDrone.Update/Lidarr.Update.csproj
@@ -4,8 +4,8 @@
net6.0
-
-
+
+