Skip to content

Class SendGridInvitationDeliveryOptions

Namespace: Cephalon.MultiTenancy.Governance.SendGridDelivery.Configuration
Assembly: Cephalon.MultiTenancy.Governance.SendGridDelivery.dll

Configures SendGrid Mail Send API delivery for tenant invitations dispatched by the governance companion pack.

public sealed class SendGridInvitationDeliveryOptions

objectSendGridInvitationDeliveryOptions

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

The SendGrid sender sends one transactional email request to the SendGrid Mail Send API. It does not own SendGrid Event Webhook callbacks, bounce translation, provider polling, public onboarding, SMS, chat, CRM, or identity-provider invitation flows.

Initializes a new instance of the class.

public SendGridInvitationDeliveryOptions()

Gets or sets response status codes that indicate the SendGrid API accepted the request.

public IReadOnlyList<int> AcceptedStatusCodes { get; set; }

IReadOnlyList<int>

The default accepts 202 Accepted. When sandbox mode is enabled, 200 OK is also accepted.

Gets or sets the SendGrid API key used as the bearer token.

public string? ApiKey { get; set; }

string?

Gets or sets the SendGrid v3 API base URL.

public string BaseUrl { get; set; }

string

The default is the global SendGrid endpoint. Hosts that use EU regional sending can set this value to https://api.eu.sendgrid.com.

Gets or sets SendGrid message categories added to each request.

public IReadOnlyList<string> Categories { get; set; }

IReadOnlyList<string>

SendGrid allows up to ten category names. Values beyond that limit are ignored by the sender.

Gets or sets SendGrid custom arguments added to each personalization.

public IReadOnlyDictionary<string, string> CustomArgs { get; set; }

IReadOnlyDictionary<string, string>

These values are sent to SendGrid and may appear in provider activity or webhook data. Do not put secrets here.

Gets or sets a value indicating whether SendGrid sandbox mode should be enabled.

public bool EnableSandboxMode { get; set; }

bool

Gets or sets a value indicating whether the SendGrid invitation sender should be registered.

public bool Enabled { get; set; }

bool

Gets or sets the verified sender email address used in the SendGrid message.

public string? FromEmail { get; set; }

string?

Gets or sets the optional sender display name used in the SendGrid message.

public string? FromName { get; set; }

string?

Gets or sets additional SendGrid message headers added to each request.

public IReadOnlyDictionary<string, string> Headers { get; set; }

IReadOnlyDictionary<string, string>

The sender filters empty, multi-line, and SendGrid-reserved headers before sending.

Gets or sets the optional HTML SendGrid message body template.

public string? HtmlBodyTemplate { get; set; }

string?

Gets or sets a value indicating whether safe Cephalon custom arguments should be added to the SendGrid request.

public bool IncludeContextCustomArgs { get; set; }

bool

Gets or sets a value indicating whether safe Cephalon context headers should be added to the SendGrid request.

public bool IncludeContextHeaders { get; set; }

bool

Gets or sets the SendGrid response header that contains the provider message identifier.

public string ProviderMessageIdHeaderName { get; set; }

string

Gets or sets the metadata key used to resolve the recipient email address when the invitee id is not an email address.

public string RecipientEmailMetadataKey { get; set; }

string

The sender checks dispatch metadata first and invitation metadata second. If neither contains a value and InviteeKind is email, the invitee id is treated as the recipient address.

Gets or sets the sender identifier used by TenantInvitationDeliveryRequest.SenderId.

public string SenderId { get; set; }

string

Gets or sets the SendGrid message subject template.

public string SubjectTemplate { get; set; }

string

Gets or sets delivery channels accepted by this sender.

public IReadOnlyList<string> SupportedChannels { get; set; }

IReadOnlyList<string>

When empty, the sender accepts every requested channel.

Gets or sets the plain-text SendGrid message body template.

public string TextBodyTemplate { get; set; }

string

Gets or sets the maximum time allowed for the SendGrid API request.

public int TimeoutSeconds { get; set; }

int

FromConfiguration(IConfiguration, string)

Section titled “ FromConfiguration(IConfiguration, string)”

Binds SendGrid invitation delivery options from configuration.

public static SendGridInvitationDeliveryOptions FromConfiguration(IConfiguration configuration, string sectionPath = "Engine")

configuration IConfiguration

The application configuration root.

sectionPath string

The configuration section path that contains the engine settings. The default is Engine.

SendGridInvitationDeliveryOptions

The bound SendGrid invitation delivery options.