Resend Utils
Adds Resend email sending with dependency injection, strongly typed email settings, and reusable mail templates. The package is meant for applications that want a consistent HTML and plain-text email layout without building the Resend message object every time an email is sent.
Use this package when an application sends transactional or notification emails through Resend and wants those emails to share the same brand values, footer text, logo, and button rendering. Application code normally creates classes that inherit from BaseMailTemplate, injects IMailService, and sends those templates through the registered mail service.
Categories
- Classes — mail template base types used by application code.
- Configuration — public configuration records bound from application configuration.
- Extensions — startup extension methods for registering Resend email services.
- Interfaces — mail sending contracts consumed through dependency injection.
- Records — small data records used by mail templates.
Quick Example
using AlmightyShogun.Resend.Utils;
builder.Services.AddResendEmail(builder.Configuration);Create a template by inheriting from BaseMailTemplate, then inject IMailService where the application needs to send it.
using AlmightyShogun.Resend.Utils;
public sealed class WelcomeMailTemplate(string displayName) : BaseMailTemplate
{
public override string Subject => "Welcome to Shogun";
protected override string Title => "Welcome";
protected override string Greeting => $"Hello {displayName},";
protected override IReadOnlyList<string> Paragraphs =>
[
"Your account is ready to use."
];
}