Skip to content

Mail Resend ​

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.

Application code creates classes inheriting BaseMailTemplate and sends them through IResendMailService, so every email shares the same brand values, footer, logo, and button rendering.

Categories ​

  • Configuration — the Email section and the settings records bound from it.
  • Extensions — startup extension methods for registering Resend email services.
  • Services — dependency-injection mail sending services.
  • Types — mail template base types used by application code.
  • Records — small data records used by mail templates.

Quick Example ​

csharp
using AlmightyShogun.Mail.Resend;

builder.Services.AddResendEmail(builder.Configuration);
csharp
using AlmightyShogun.Mail.Resend;

public sealed class WelcomeMailTemplate(string name) : BaseMailTemplate
{
    public override string Subject => "Welcome to Shogun";
    protected override string Title => "Welcome";
    protected override string Greeting => $"Hello {name},";

    protected override IReadOnlyList<string> Paragraphs =>
    [
        "Your account is ready to use."
    ];
}
csharp
using AlmightyShogun.Mail.Resend;

public sealed class SignupService(IResendMailService mailService)
{
    public Task SendWelcomeAsync(string email, string name)
        => mailService.SendAsync(email, new WelcomeMailTemplate(name));
}

All packages are released under the MIT License.