email-service

Send transactional emails via SendGrid with templated content and localization.

69|13|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/ronnythedev/dotnet-clean-architecture-skills --skill email-service
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: email-service
Source: https://github.com/ronnythedev/dotnet-clean-architecture-skills/tree/main/sample/POS/.claude/skills/16.1-email-service-sendgrid
Command: npx skills add https://github.com/ronnythedev/dotnet-clean-architecture-skills --skill email-service

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Abstracted email service to handle transactional emails using SendGrid with templates and localization, reducing ad-hoc SMTP integrations.

Core Features & Use Cases

  • IEmailService interface abstraction and SendGrid-based implementation for reliable email delivery
  • Template support with localization for multiple languages
  • Domain event integration to trigger emails on user actions (e.g., welcome, password reset)

Quick Start

  • Configure EmailOptions with your SendGrid API key and template IDs in appsettings.json
  • Wire IEmailService into DI and call SendWelcomeEmailAsync or SendPasswordResetEmailAsync as needed

Frequently Asked Questions about email-service

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send transactional emails with SendGrid templates in .NET?

To send transactional emails with SendGrid templates, wire IEmailService into dependency injection, configure API keys and template IDs in appsettings.json, then call methods like SendWelcomeEmailAsync to dispatch localized templated messages.

What is the best way to trigger password reset emails on user actions?

Triggering password reset emails is best handled through domain event integration, where user actions raise events that the IEmailService implementation listens to, automatically dispatching SendGrid templated emails without ad-hoc SMTP code.

How do I add localization to SendGrid email templates?

Localization for SendGrid email templates is handled by configuring language-specific content within the service abstraction, allowing the SendGrid provider to dispatch emails using template IDs mapped to the user's preferred locale.

Do I need to configure API keys in appsettings to use SendGrid for email delivery?

Yes, you need to configure API keys in appsettings.json as part of EmailOptions, along with your SendGrid template IDs, to enable the production-ready provider to authenticate and dispatch transactional emails securely.

Why abstract email sending behind an interface instead of calling SendGrid directly?

Abstracting email sending behind an IEmailService interface reduces scattered ad-hoc SMTP integrations, centralizes localization and template management, and allows domain events to trigger consistent transactional emails across applications.

Can I use this email service abstraction without domain events?

Yes, while domain event integration supports triggered emails, you can directly inject and call IEmailService methods like SendWelcomeEmailAsync wherever needed in your application flow without relying on the domain event pattern.

Related Skills