We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is different than the current implementation which is focused on the higher-level email. This is the actual CONTENT of the email.
Current usage outside of this project is
public interface IEmailMessageService { Task<string> BuildMessage(string messageTemplateName, List<KeyValuePair<string, string>> replacements); } public class EmailMessageService : IEmailMessageService { private readonly IWebHostEnvironment _environment; private readonly ITimeProvider _timeProvider; public EmailMessageService(IWebHostEnvironment environment, ITimeProvider timeProvider) { _environment = environment; _timeProvider = timeProvider; } public async Task<string> BuildMessage(string messageTemplateName, List<KeyValuePair<string, string>> replacements) { var templateBuilder = new StringBuilder(await File.ReadAllTextAsync(Path.Combine(_environment.WebRootPath, $"emailmessages/{messageTemplateName}.html"))); foreach (var item in replacements) templateBuilder.Replace(item.Key, item.Value); return templateBuilder.ToString(); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is different than the current implementation which is focused on the higher-level email. This is the actual CONTENT of the email.
Current usage outside of this project is
The text was updated successfully, but these errors were encountered: