mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 01:54:43 +00:00
Update XML doc comment in backend projects
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user