11
2- < << << << HEAD
3- using Aquiis . SimpleStart . Application . Services ;
4- using Aquiis . SimpleStart . Core . Interfaces . Services ;
5-
6- namespace Aquiis . SimpleStart . Infrastructure . Services
7- {
8- public class EmailService : IEmailService
9- {
10- private readonly ILogger < EmailService > _logger ;
11- private readonly IConfiguration _configuration ;
12-
13- public EmailService ( ILogger < EmailService > logger , IConfiguration configuration )
14- {
15- _logger = logger ;
16- _configuration = configuration ;
17- }
18-
19- public async Task SendEmailAsync ( string to , string subject , string body )
20- {
21- // TODO: Implement with SendGrid/Mailgun in Task 2.5
22- _logger . LogInformation ( $ "[EMAIL] To: { to } , Subject: { subject } , Body: { body } ") ;
23- await Task . CompletedTask ;
24- }
25-
26- public async Task SendEmailAsync ( string to , string subject , string body , string ? fromName = null )
27- {
28- _logger . LogInformation ( $ "[EMAIL] From: { fromName } , To: { to } , Subject: { subject } ") ;
29- await Task . CompletedTask ;
30- }
31-
32- public async Task SendTemplateEmailAsync ( string to , string templateId , Dictionary < string , string > templateData )
33- {
34- _logger . LogInformation ( $ "[EMAIL TEMPLATE] To: { to } , Template: { templateId } ") ;
35- await Task . CompletedTask ;
36- }
37-
38- public async Task < bool > ValidateEmailAddressAsync ( string email )
39- {
40- // Basic validation
41- return await Task . FromResult ( ! string . IsNullOrWhiteSpace ( email ) && email . Contains ( "@" ) ) ;
42- }
43- = == == ==
442using Aquiis . SimpleStart . Core . Interfaces . Services ;
453
464namespace Aquiis . SimpleStart . Infrastructure . Services ;
@@ -79,6 +37,5 @@ public async Task<bool> ValidateEmailAddressAsync(string email)
7937 {
8038 // Basic validation
8139 return await Task . FromResult ( ! string . IsNullOrWhiteSpace ( email ) && email . Contains ( "@" ) ) ;
82- > >>> >>> phase - 2.4 - notification - infrastructure
8340 }
8441}
0 commit comments