Hi Team,
I have added the following D.I. in my code,
services.AddSendGrid(options =>
{
options.ApiKey = Environment.GetEnvironmentVariable("SENDGRID_API_KEY");
})
Now I am getting SendGridClient in my service with the APIKey. But I want to change the API key before calling "SendEmailAsync". Can you please suggest any possible way for this.