Handle OtP mail issue. Earlier template was fetched from database now its from file
This commit is contained in:
parent
80141c8ffa
commit
1e5c69e6ad
@ -57,7 +57,10 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="EmailTemplates\NewFolder\" />
|
||||
<Compile Remove="EmailTemplates\NewFolder\**" />
|
||||
<Content Remove="EmailTemplates\NewFolder\**" />
|
||||
<EmbeddedResource Remove="EmailTemplates\NewFolder\**" />
|
||||
<None Remove="EmailTemplates\NewFolder\**" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -179,13 +179,15 @@ namespace MarcoBMS.Services.Service
|
||||
{ "OTP_CODE", otp }
|
||||
};
|
||||
|
||||
foreach (var item in replacements)
|
||||
{
|
||||
emailBody = emailBody.Replace($"{{{{{item.Key}}}}}", item.Value);
|
||||
}
|
||||
emailBody = await GetEmailTemplate("send-otp", replacements);
|
||||
|
||||
//foreach (var item in replacements)
|
||||
//{
|
||||
// emailBody = emailBody.Replace($"{{{{{item.Key}}}}}", item.Value);
|
||||
//}
|
||||
|
||||
subject = CheckSubject(subject);
|
||||
await SendEmailAsync(toEmails, subject, emailBody);
|
||||
await SendEmailAsync(toEmails, "One-Time Password (OTP) for Verification", emailBody);
|
||||
}
|
||||
public async Task SendEmailAsync(List<string> toEmails, string subject, string body)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user