13
13
public partial class EmailService
14
14
{
15
15
/// <inheritdoc/>
16
- public EmailSendingResult Send ( Message message )
16
+ public EmailSendingResult Send ( EmailMessage message )
17
17
=> Send ( message , _defaultProvider ) ;
18
18
19
19
/// <inheritdoc/>
20
- public Task < EmailSendingResult > SendAsync ( Message message )
20
+ public Task < EmailSendingResult > SendAsync ( EmailMessage message )
21
21
=> SendAsync ( message , _defaultProvider ) ;
22
22
23
23
/// <inheritdoc/>
24
- public EmailSendingResult Send ( Message message , string edp_name )
24
+ public EmailSendingResult Send ( EmailMessage message , string edp_name )
25
25
{
26
26
// check if the provider name is valid
27
27
if ( edp_name is null )
@@ -36,7 +36,7 @@ public EmailSendingResult Send(Message message, string edp_name)
36
36
}
37
37
38
38
/// <inheritdoc/>
39
- public Task < EmailSendingResult > SendAsync ( Message message , string edp_name )
39
+ public Task < EmailSendingResult > SendAsync ( EmailMessage message , string edp_name )
40
40
{
41
41
// check if the provider name is valid
42
42
if ( edp_name is null )
@@ -51,7 +51,7 @@ public Task<EmailSendingResult> SendAsync(Message message, string edp_name)
51
51
}
52
52
53
53
/// <inheritdoc/>
54
- public EmailSendingResult Send ( Message message , IEmailDeliveryProvider edp )
54
+ public EmailSendingResult Send ( EmailMessage message , IEmailDeliveryProvider edp )
55
55
{
56
56
// check if given params are not null.
57
57
if ( message is null )
@@ -75,7 +75,7 @@ public EmailSendingResult Send(Message message, IEmailDeliveryProvider edp)
75
75
}
76
76
77
77
/// <inheritdoc/>
78
- public Task < EmailSendingResult > SendAsync ( Message message , IEmailDeliveryProvider edp )
78
+ public Task < EmailSendingResult > SendAsync ( EmailMessage message , IEmailDeliveryProvider edp )
79
79
{
80
80
// check if given params are not null.
81
81
if ( message is null )
@@ -161,12 +161,12 @@ public EmailService(IEnumerable<IEmailDeliveryProvider> emailDeliveryProviders,
161
161
/// check if the message from value is supplied
162
162
/// </summary>
163
163
/// <param name="message">the message instance</param>
164
- private void CheckMessageFromValue ( Message message )
164
+ private void CheckMessageFromValue ( EmailMessage message )
165
165
{
166
166
if ( message . From is null )
167
167
{
168
168
if ( Options . DefaultFrom is null )
169
- throw new ArgumentException ( $ "the { typeof ( Message ) . FullName } [From] value is null, either supply a from value in the message, or set a default [From] value in { typeof ( EmailServiceOptions ) . FullName } ") ;
169
+ throw new ArgumentException ( $ "the { typeof ( EmailMessage ) . FullName } [From] value is null, either supply a from value in the message, or set a default [From] value in { typeof ( EmailServiceOptions ) . FullName } ") ;
170
170
171
171
message . SetFrom ( Options . DefaultFrom ) ;
172
172
}
0 commit comments