Update XML doc comment in backend projects

This commit is contained in:
Aaron Po
2026-08-18 16:28:25 -04:00
parent 6a53167cb8
commit 693f74bb5b
53 changed files with 287 additions and 83 deletions

View File

@@ -5,7 +5,17 @@ namespace Infrastructure.Email;
/// </summary>
public interface IEmailProvider
{
/// <summary>Sends an email to a single recipient.</summary>
/// <param name="to">The recipient's email address.</param>
/// <param name="subject">The email subject line.</param>
/// <param name="body">The email body content.</param>
/// <param name="isHtml">Whether <paramref name="body"/> is HTML; when <see langword="false"/> it is sent as plain text.</param>
Task SendAsync(string to, string subject, string body, bool isHtml = true);
/// <summary>Sends an email to multiple recipients.</summary>
/// <param name="to">The recipients' email addresses.</param>
/// <param name="subject">The email subject line.</param>
/// <param name="body">The email body content.</param>
/// <param name="isHtml">Whether <paramref name="body"/> is HTML; when <see langword="false"/> it is sent as plain text.</param>
Task SendAsync(IEnumerable<string> to, string subject, string body, bool isHtml = true);
}

View File

@@ -51,15 +51,17 @@ public class SmtpEmailProvider : IEmailProvider
_fromName = Environment.GetEnvironmentVariable("SMTP_FROM_NAME") ?? "The Biergarten";
}
/// <inheritdoc/>
public async Task SendAsync(string to, string subject, string body, bool isHtml = true)
{
await SendAsync([to], subject, body, isHtml);
}
/// <summary>
/// <inheritdoc/>
/// <remarks>
/// Connects using StartTls when SSL is enabled (or no encryption otherwise), authenticates
/// if credentials were configured, sends the message, and disconnects.
/// </summary>
/// </remarks>
/// <exception cref="InvalidOperationException">
/// Thrown when connecting, authenticating, or sending via SMTP fails, wrapping the original exception.
/// </exception>