Add queued email and Firebase push delivery

This commit is contained in:
GonnaHetzMe committed 2026-11-19 14:02:02 +01:00
1 parent c96eb155ae
commit 599237dd2c
22 files changed
+497 -8

No files matched your search

@@ -25,7 +25,7 @@ internal sealed partial class SmtpEmailSender(IOptions<SmtpOptions> options, ILo
if (!MailboxAddress.TryParse(to, out var recipient))
{
LogDeliveryFailure("InvalidRecipient");
throw new EmailDeliveryException();
throw new EmailDeliveryException("SMTP_INVALID_RECIPIENT", retryable: false);
}
var settings = options.Value;
@@ -48,7 +48,13 @@ internal sealed partial class SmtpEmailSender(IOptions<SmtpOptions> options, ILo
OperationCanceledException))
{
LogDeliveryFailure(exception.GetType().Name);
throw new EmailDeliveryException();
if (exception is SmtpCommandException command)
{
var status = (int)command.StatusCode;
throw new EmailDeliveryException($"SMTP_{status}", retryable: status is < 500 or >= 600);
}
throw new EmailDeliveryException($"SMTP_{exception.GetType().Name}", retryable: true);
}
}