You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Initializes a new instance of the <see cref="EmailTemplateService"/> class.
26
21
/// </summary>
27
22
/// <param name="logger">The logger for diagnostic and error messages.</param>
28
23
/// <param name="options">The email options containing sender and template configuration.</param>
29
24
/// <param name="templateService">The template service for applying models to templates.</param>
30
25
/// <param name="deliveryService">The service responsible for delivering emails.</param>
26
+
/// <exception cref="ArgumentNullException">
27
+
/// Thrown if <paramref name="logger"/>, <paramref name="options"/>, <paramref name="templateService"/>, or <paramref name="deliveryService"/> is <see langword="null"/>.
/// Sends an email using a named template, binding the specified model to the template and delivering it to the given recipients.
45
63
/// </summary>
46
64
/// <typeparam name="TModel">The type of the model used for template binding.</typeparam>
47
65
/// <param name="templateName">The name of the template to use for the email.</param>
48
66
/// <param name="emailModel">The model containing data to bind to the template.</param>
49
67
/// <param name="recipients">The recipients of the email, including To, Cc, and Bcc addresses.</param>
50
-
/// <param name="senders">The sender and optional reply-to addresses for the email. If null, default senders from configuration are used.</param>
68
+
/// <param name="senders">The sender and optional reply-to addresses for the email. If <see langword="null"/>, default senders from configuration are used.</param>
51
69
/// <param name="cancellationToken">A token to monitor for cancellation requests.</param>
52
70
/// <returns>
53
71
/// A <see cref="Task{TResult}"/> that resolves to an <see cref="EmailResult"/> indicating the outcome of the send operation,
54
72
/// including success status, message, and any exception details.
55
73
/// </returns>
56
-
/// <exception cref="ArgumentException">Thrown if <paramref name="templateName"/> is null or empty.</exception>
57
-
/// <exception cref="ArgumentNullException">Thrown if <paramref name="emailModel"/> is null.</exception>
74
+
/// <exception cref="ArgumentException">Thrown if <paramref name="templateName"/> is <see langword="null"/> or empty.</exception>
75
+
/// <exception cref="ArgumentNullException">Thrown if <paramref name="emailModel"/> is <see langword="null"/>.</exception>
76
+
/// <exception cref="Exception">Thrown if an error occurs during template loading or email sending.</exception>
58
77
publicasyncTask<EmailResult>Send<TModel>(
59
78
stringtemplateName,
60
79
TModelemailModel,
@@ -65,7 +84,7 @@ public async Task<EmailResult> Send<TModel>(
@@ -97,13 +115,14 @@ public async Task<EmailResult> Send<TModel>(
97
115
/// <param name="emailTemplate">The email template to use for the message.</param>
98
116
/// <param name="emailModel">The model containing data to bind to the template.</param>
99
117
/// <param name="recipients">The recipients of the email, including To, Cc, and Bcc addresses.</param>
100
-
/// <param name="senders">The sender and optional reply-to addresses for the email. If null, default senders from configuration are used.</param>
118
+
/// <param name="senders">The sender and optional reply-to addresses for the email. If <see langword="null"/>, default senders from configuration are used.</param>
101
119
/// <param name="cancellationToken">A token to monitor for cancellation requests.</param>
102
120
/// <returns>
103
121
/// A <see cref="Task{TResult}"/> that resolves to an <see cref="EmailResult"/> indicating the outcome of the send operation,
104
122
/// including success status, message, and any exception details.
105
123
/// </returns>
106
-
/// <exception cref="ArgumentNullException">Thrown if <paramref name="emailModel"/> is null.</exception>
124
+
/// <exception cref="ArgumentNullException">Thrown if <paramref name="emailModel"/> is <see langword="null"/>.</exception>
125
+
/// <exception cref="Exception">Thrown if an error occurs during template application or email sending.</exception>
107
126
publicasyncTask<EmailResult>Send<TModel>(
108
127
EmailTemplateemailTemplate,
109
128
TModelemailModel,
@@ -113,13 +132,13 @@ public async Task<EmailResult> Send<TModel>(
0 commit comments