public class MyEmailServices<TUser> : IEmailSender {
private readonly string _logFilePath = "fakeMail.txt";
public MyEmailServices() {
}
public async Task SendEmailAsync(string email, string subject, string message)
{
// Format the log entry
string logEntry = $"[{DateTime.Now}] To: {email}\nSubject: {subject}\nMessage: {message}\n\n";
// Append the log entry to the file
await File.AppendAllTextAsync(_logFilePath, logEntry);
}
}
public class MyEmailServices<TUser> : IEmailSender {
private readonly string _logFilePath = "fakeMail.txt";
public MyEmailServices() {
}
public async Task SendEmailAsync(string email, string subject, string message)
{
// Format the log entry
string logEntry = $"[{DateTime.Now}] To: {email}\nSubject: {subject}\nMessage: {message}\n\n";
// Append the log entry to the file
await File.AppendAllTextAsync(_logFilePath, logEntry);
}
}