fix(email): validate settings before sending; use hmac for tokens

This commit is contained in:
2026-03-07 10:44:26 -05:00
parent 32c46b8c2b
commit 2b66cb2762
2 changed files with 17 additions and 4 deletions
@@ -16,6 +16,11 @@ namespace SharpbinV3.Server.Services
public async Task SendAsync(string to, string subject, string body)
{
if (string.IsNullOrWhiteSpace(settings.Host) || string.IsNullOrWhiteSpace(settings.User) || string.IsNullOrWhiteSpace(settings.Password))
{
logger.LogWarning($"Email settings are not fully configured. Skipping sending email to {to}");
return;
}
var email = new QueuedEmail(to, subject, body);
if (queue.Writer.TryWrite(email))