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>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="EmailTemplates\NewFolder\" />
|
<Compile Remove="EmailTemplates\NewFolder\**" />
|
||||||
|
<Content Remove="EmailTemplates\NewFolder\**" />
|
||||||
|
<EmbeddedResource Remove="EmailTemplates\NewFolder\**" />
|
||||||
|
<None Remove="EmailTemplates\NewFolder\**" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -179,13 +179,15 @@ namespace MarcoBMS.Services.Service
|
|||||||
{ "OTP_CODE", otp }
|
{ "OTP_CODE", otp }
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var item in replacements)
|
emailBody = await GetEmailTemplate("send-otp", replacements);
|
||||||
{
|
|
||||||
emailBody = emailBody.Replace($"{{{{{item.Key}}}}}", item.Value);
|
//foreach (var item in replacements)
|
||||||
}
|
//{
|
||||||
|
// emailBody = emailBody.Replace($"{{{{{item.Key}}}}}", item.Value);
|
||||||
|
//}
|
||||||
|
|
||||||
subject = CheckSubject(subject);
|
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)
|
public async Task SendEmailAsync(List<string> toEmails, string subject, string body)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user