Skip to content

Commit

Permalink
fix(mail): wrong validation condition
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Sep 2, 2024
1 parent 0383fee commit 0b084be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GZCTF/Services/Mail/MailSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public MailSender(
_cancellationToken = _cancellationTokenSource.Token;

if (string.IsNullOrWhiteSpace(_options.SendMailAddress) ||
string.IsNullOrWhiteSpace(_options.Smtp?.Host) || _options.Smtp.Port is not null)
string.IsNullOrWhiteSpace(_options.Smtp?.Host) || _options.Smtp.Port is not > 0)
return;

_smtpClient = new();
Expand Down

0 comments on commit 0b084be

Please sign in to comment.