net3000.sendgrid
1.0.0
dotnet add package net3000.sendgrid --version 1.0.0
NuGet\Install-Package net3000.sendgrid -Version 1.0.0
<PackageReference Include="net3000.sendgrid" Version="1.0.0" />
<PackageVersion Include="net3000.sendgrid" Version="1.0.0" />
<PackageReference Include="net3000.sendgrid" />
paket add net3000.sendgrid --version 1.0.0
#r "nuget: net3000.sendgrid, 1.0.0"
#:package net3000.sendgrid@1.0.0
#addin nuget:?package=net3000.sendgrid&version=1.0.0
#tool nuget:?package=net3000.sendgrid&version=1.0.0
Net3000.SendGrid
Overview
The Net3000.SendGrid library provides comprehensive integration with the SendGrid email delivery platform for Net3000 solutions. This library enables transactional email sending, email analytics, template management, and advanced email features using SendGrid's robust email infrastructure.
Features
- Transactional Email: Send transactional emails with templates and dynamic content
- Email Analytics: Track email delivery, opens, clicks, and engagement metrics
- Template Management: Create and manage email templates
- Contact Management: Manage subscriber lists and contact information
- Event Webhooks: Handle SendGrid event webhooks for real-time email tracking
- Advanced Features: Support for attachments, inline CSS, and personalization
Installation
dotnet add package net3000.sendgrid
Dependencies
net3000.common(v9.0.11)SendGrid(v9.29.3)Microsoft.Extensions.Configuration(v9.0.9)Microsoft.EntityFrameworkCore(v9.0.9)System.IdentityModel.Tokens.Jwt(v8.14.0)
Configuration
Add your SendGrid credentials to your configuration:
{
"SendGrid": {
"ApiKey": "your-sendgrid-api-key",
"FromEmail": "noreply@example.com",
"FromName": "Your Company Name",
"DefaultTemplateId": "your-default-template-id"
}
}
Usage
Basic Setup
using Net3000.SendGrid;
// Initialize the service
var sendGridService = new SendGridService(configuration);
Sending Emails
// Send a simple email
var emailResult = await sendGridService.SendEmailAsync(
to: "recipient@example.com",
subject: "Hello from Net3000",
htmlContent: "<h1>Hello!</h1><p>This is a test email.</p>"
);
// Send email with template
var templateResult = await sendGridService.SendTemplateEmailAsync(
to: "recipient@example.com",
templateId: "your-template-id",
dynamicData: new { name = "John Doe", company = "Example Corp" }
);
Email Analytics
// Get email statistics
var stats = await sendGridService.GetEmailStatsAsync(
startDate: DateTime.Now.AddDays(-30),
endDate: DateTime.Now
);
// Get specific email activity
var activity = await sendGridService.GetEmailActivityAsync("email-id");
API Reference
SendGridService Class
Main service class for SendGrid integration.
Methods
SendEmailAsync()- Send simple emailSendTemplateEmailAsync()- Send email using templateSendBulkEmailAsync()- Send bulk emailsGetEmailStatsAsync()- Retrieve email statisticsGetEmailActivityAsync()- Get email activity dataCreateTemplateAsync()- Create email templateUpdateTemplateAsync()- Update existing template
Models
EmailMessage- Email message structureEmailTemplate- Template data modelEmailStats- Email statistics dataEmailActivity- Email activity trackingSendGridResponse- API response wrapper
Error Handling
Comprehensive error handling with detailed error messages from SendGrid API. All methods include proper exception handling and return standardized response objects.
Rate Limiting
The library respects SendGrid API rate limits and includes built-in retry logic for handling temporary rate limit exceeded responses.
Email Templates
- Support for dynamic templates with handlebars syntax
- Template versioning and management
- A/B testing capabilities
- Template validation and testing
Analytics and Tracking
- Real-time email delivery tracking
- Open and click tracking
- Unsubscribe and bounce handling
- Custom event tracking
Security Features
- Email authentication (SPF, DKIM, DMARC)
- Link validation and sanitization
- Attachment security scanning
- Content filtering and validation
Testing
Use SendGrid's test environment for development:
- Test API key from SendGrid dashboard
- Test email addresses for development
- Sandbox mode for testing without sending actual emails
License
This library is proprietary to Net3000. Usage is restricted to Net3000.ca solutions and authorized affiliates. Redistribution, sublicensing, or integration with third-party products outside the Net3000 ecosystem is prohibited without written consent from Net3000.
Support
For support and questions, contact the Net3000 development team or visit net3000.ca.
Changelog
v1.0.0
- Initial release with SendGrid email delivery capabilities
- Template management and dynamic content support
- Email analytics and activity tracking
- Comprehensive error handling and response management
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.EntityFrameworkCore (>= 10.0.7)
- Microsoft.Extensions.Configuration (>= 10.0.7)
- net3000.common (>= 10.0.19)
- SendGrid (>= 9.29.3)
- System.IdentityModel.Tokens.Jwt (>= 8.17.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on net3000.sendgrid:
| Package | Downloads |
|---|---|
|
net3000.mailingList
Mailing list management library for Net3000.ca applications. Subscriber management, campaigns, multi-platform integrations (SendGrid, MailChimp, Constant Contact), delivery tracking, and audience contact sources. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 76 | 6/30/2026 |
Initial release of Net3000 SendGrid library with email delivery and analytics capabilities.