User2142845853 posted
public class EmailService : IIdentityMessageService
{
public Task SendAsync(IdentityMessage message)
{
// Plug in your email service here to send an email.
return Task.FromResult(0);
}
}
To send email you have to plug in the code that does the email
public Task SendAsync(IdentityMessage message)
{
// Plug in your email service here to send an email.
return configSendGridasync(message);
}
Then add the method
private Task configSendGridasync(IdentityMessage message)
{
MailMessage mailMsg = new MailMessage();
// To
mailMsg.To.Add(new MailAddress(message.Destination.ToString(), "To Name"));
It will need these namespaces
using System.Net.Mail;
using System.Net.Mime;
more detail: https://github.com/sendgrid/sendgrid-csharp/issues/315