Duende.IdentityServer.Admin icon indicating copy to clipboard operation
Duende.IdentityServer.Admin copied to clipboard

Configuration of SendGrid IpPoolName

Open ghstahl opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. We setup sendgrid to leverage IpPoolName(s) and it can be set before we send the email.

i.e.


var message = SendGrid.Helpers.Mail.MailHelper.CreateSingleEmail(
     new SendGrid.Helpers.Mail.EmailAddress(_configuration.SourceEmail, _configuration.SourceName),
     new SendGrid.Helpers.Mail.EmailAddress(email),
      subject,
      null,
      htmlMessage
 );
if (_configuration.IpPoolName != null)
{
    message.SetIpPoolName(_configuration.IpPoolName);
}

Describe the solution you'd like Allow IpPoolName to be configurable.

    public class SendGridConfiguration
    {
        public string ApiKey { get; set; }
        public string SourceEmail { get; set; }
        public string SourceName { get; set; }
        public bool EnableClickTracking { get; set; } = false;
        public string? IpPoolName { get; set; }

    }

I think this is the extent of the code change.

ghstahl avatar Jan 12 '23 22:01 ghstahl

Hi, please, can you send a PR with this change? Thanks

skoruba avatar Jan 13 '23 11:01 skoruba