Class SendGridOptions
- Namespace
- Builvero.Application.Options
- Assembly
- Builvero.Application.dll
Configuration options for SendGrid email service integration.
public class SendGridOptions
- Inheritance
-
SendGridOptions
- Inherited Members
Remarks
These options are typically configured in appsettings.json or via environment variables.
The API key can be provided directly via ApiKey or resolved from AWS SSM Parameter Store
using ApiKeyParameterName.
All template IDs must correspond to valid SendGrid dynamic templates in your SendGrid account. Template IDs typically start with "d-" (e.g., "d-1234567890abcdef").
Properties
ActivateAccountTemplateId
Gets or sets the SendGrid dynamic template ID for activating new accounts.
public string ActivateAccountTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
Remarks
Template expects: full_name, verify_url, verification_code, support_email, company_name.
AdminUpdatesTemplateId
Gets or sets the SendGrid dynamic template ID for admin update emails.
public string AdminUpdatesTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
Remarks
Used by the Admin Updates feature (POST /api/admin/updates/send).
The template must support the content_html dynamic field for raw HTML rendering.
The email subject is defined in the template and cannot be overridden.
ApiKey
Gets or sets the SendGrid API key for direct configuration.
public string ApiKey { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
Remarks
This field is optional if ApiKeyParameterName is configured. The API key should start with "SG." and be a valid SendGrid API key.
Priority order for API key resolution:
- Environment variable:
SENDGRID_API_KEY - SSM Parameter Store: Value from ApiKeyParameterName
- This property value
ApiKeyParameterName
Gets or sets the AWS SSM Parameter Store parameter name for resolving the SendGrid API key.
public string ApiKeyParameterName { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
Remarks
Defaults to "/builvero/prod/sendgrid/api_key". Used in production environments
to securely retrieve the API key from AWS Systems Manager Parameter Store.
ForumNewMessageTemplateId
Gets or sets the SendGrid dynamic template ID for forum new message notification emails.
public string ForumNewMessageTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
ForumNewTopicTemplateId
Gets or sets the SendGrid dynamic template ID for forum new topic notification emails.
public string ForumNewTopicTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
FromEmail
Gets or sets the email address used as the "From" address for all SendGrid emails.
public string FromEmail { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
Remarks
This must be a verified sender in your SendGrid account.
FromName
Gets or sets the display name used as the "From" name for all SendGrid emails.
public string FromName { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
Remarks
Defaults to "Builvero". This appears as the sender name in email clients.
HelloTemplateId
Gets or sets the SendGrid dynamic template ID for the "Hello" test email.
public string HelloTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
Remarks
Used by the admin email test feature (POST /api/admin/test-email).
InvitationTemplateId
Gets or sets the SendGrid dynamic template ID for invitation emails.
public string InvitationTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
Remarks
Sent when an admin sends an invitation code to one or more email addresses. The template should support dynamic data: invitation_code, invitation_link, expires_at, label, sender_name, support_email, current_year.
ProjectInviteAcceptedTemplateId
Gets or sets the SendGrid dynamic template ID for project invitation accepted emails.
public string ProjectInviteAcceptedTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
ProjectInviteDeclinedTemplateId
Gets or sets the SendGrid dynamic template ID for project invitation declined emails.
public string ProjectInviteDeclinedTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
ProjectInviteTemplateId
Gets or sets the SendGrid dynamic template ID for project invitation emails.
public string ProjectInviteTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
ProjectJoinApprovedTemplateId
Gets or sets the SendGrid dynamic template ID for project join request approved emails.
public string ProjectJoinApprovedTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
ProjectJoinDeclinedTemplateId
Gets or sets the SendGrid dynamic template ID for project join request declined emails.
public string ProjectJoinDeclinedTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
ProjectJoinRequestTemplateId
Gets or sets the SendGrid dynamic template ID for project join request emails.
public string ProjectJoinRequestTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
VolunteerApplicationAcceptedTemplateId
Gets or sets the SendGrid dynamic template ID for volunteer application status "Accepted" emails.
public string VolunteerApplicationAcceptedTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
Remarks
Sent when a volunteer application status is set to "Accepted".
VolunteerApplicationDeclinedTemplateId
Gets or sets the SendGrid dynamic template ID for volunteer application "Declined" emails.
public string VolunteerApplicationDeclinedTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
Remarks
Sent when a volunteer application is discarded/declined.
VolunteerApplicationWaitlistTemplateId
Gets or sets the SendGrid dynamic template ID for volunteer application status "Waitlist" emails.
public string VolunteerApplicationWaitlistTemplateId { get; set; }
Property Value
- string
- Configuration options for SendGrid email service integration.
Remarks
Sent when a volunteer application status is set to "Reviewed" (waitlist).