Stable email sender
This commit is contained in:
@@ -16,7 +16,7 @@ public class SendEmailCommandHandler(IOptions<SmtpSettings> smtpOptions) : IRequ
|
||||
if(settings.Credentials == null)
|
||||
return Result.Fail(new Error("SMTP credentials are not configured."));
|
||||
|
||||
if(string.IsNullOrWhiteSpace(settings.Credentials.Username) || string.IsNullOrWhiteSpace(settings.Credentials.Password))
|
||||
if(string.IsNullOrWhiteSpace(settings?.Credentials.Username) || string.IsNullOrWhiteSpace(settings.Credentials.Password))
|
||||
return Result.Fail(new Error("SMTP credentials are incomplete."));
|
||||
|
||||
if(string.IsNullOrWhiteSpace(settings.Host) || settings.Port == 0)
|
||||
|
||||
Reference in New Issue
Block a user