fix: confirm email changes and enforce clean backend build
This commit is contained in:
@@ -5,14 +5,15 @@ namespace Socialize.Api.Infrastructure.Emailer.Services;
|
||||
internal class LoggerEmailSender(ILogger<IEmailSender> logger)
|
||||
: IEmailSender
|
||||
{
|
||||
private static readonly Action<ILogger, string, string, string, string, Exception?> LogDevelopmentEmail =
|
||||
LoggerMessage.Define<string, string, string, string>(
|
||||
LogLevel.Information,
|
||||
new EventId(1, nameof(SendEmailAsync)),
|
||||
"Development email to {Email} with subject {Subject}:{NewLine}{Message}");
|
||||
|
||||
public Task SendEmailAsync(string email, string subject, string message)
|
||||
{
|
||||
logger.LogInformation(
|
||||
"Development email to {Email} with subject {Subject}:{NewLine}{Message}",
|
||||
email,
|
||||
subject,
|
||||
Environment.NewLine,
|
||||
message);
|
||||
LogDevelopmentEmail(logger, email, subject, Environment.NewLine, message, null);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user