chore: configure preprod email secrets
This commit is contained in:
@@ -20,6 +20,16 @@ public class ResendEmailSender : IEmailSender
|
||||
_httpClient = httpClientFactory.CreateClient();
|
||||
_options = options.Value;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(_options.ApiKey))
|
||||
{
|
||||
throw new InvalidOperationException("Emailer:ApiKey is required when using Resend email delivery.");
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(_options.FromEmail))
|
||||
{
|
||||
throw new InvalidOperationException("Emailer:FromEmail is required when using Resend email delivery.");
|
||||
}
|
||||
|
||||
_httpClient.DefaultRequestHeaders.Authorization =
|
||||
new AuthenticationHeaderValue("Bearer", _options.ApiKey);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user