In startup.cs I have:
services.AddTransient<IEmailSender, EmailSender>();
services.Configure<AuthMessageSenderOptions>(Configuration);
In EmailSender
class I have:
public Task SendEmailAsync(string email, string subject, string message)
{
return Execute( subject, message, email);
}
public Task Execute( string subject, string message, string email)
{
var apiKey = Environment.GetEnvironmentVariable("KEY");
//var client = new SendGridClient(apiKey);
var client = new SendGridClient(apiKey);
var msg = new SendGridMessage()
{
From = new EmailAddress("Joe@contoso.com", Options.SendGridUser),
Subject = subject,
PlainTextContent = message,
HtmlContent = message
};
msg.AddTo(new EmailAddress(email));
// Disable click tracking.
// See https://sendgrid.com/docs/User_Guide/Settings/tracking.html
msg.SetClickTracking(false, false);
return client.SendEmailAsync(msg);
}
I am getting this page instead of sending mail.As refereed to Microsoft documentation I do not have /Identity/Account/Manage/PersonalData page also.