MyMail.Blazor (2.1.12)

Published 2026-11-20 16:52:52 +00:00 by RAAPEREIRA

Installation

dotnet nuget add source --name RAAPEREIRA --username your_username --password your_token 
dotnet add package --source RAAPEREIRA --version 2.1.12 MyMail.Blazor

About this package

Blazor email client UI components built on MyMail and SmarterMail.Net.

MyMail.Blazor

An embeddable Blazor email client built on MyMail and SmarterMail.Net. Targets .NET 10 and includes its own styles without requiring a third-party component library.

Installation

Install the package from your configured NuGet feed:

dotnet add package MyMail.Blazor

Configuration

Register both the headless library and the Blazor services in Program.cs:

using MyMail.Extensions;
using MyMail.Blazor.Extensions;

services.AddMyMail(options =>
{
    options.BaseUrl = "https://mail.example.com";
    options.AllowedEmailDomains = new[] { "example.com" }; // Optional
});
services.AddMyMailBlazor();

Add the stylesheet to your host page:

<link href="_content/MyMail.Blazor/mymail.css" rel="stylesheet" />

Import the component namespace in _Imports.razor:

@using MyMail.Blazor.Components.Mail

Render the mail client with credentials supplied by your application:

<MailClient @key="username" Username="@username" Password="@password" />

The host application owns authentication. Use @key to remount the component when switching users. AddMyMailBlazor() does not register AddMyMail(); both registrations are required.

Inline images and Content-Security-Policy

Message bodies render in a sandboxed srcdoc iframe. Inline images are embedded as data: URIs by MyMail (SmarterMail's /attachment/inline URLs need authentication and fail with 401 Missing auth in an iframe). If your host application sends a Content-Security-Policy, allow data: images, for example img-src 'self' data: https:. Without it, inline images in received messages do not display.

Dependencies

ID Version Target Framework
MyMail 2.1.12 net10.0
Details
NuGet
2026-11-20 16:52:52 +00:00
4
2026-11-24 07:23:46 +00:00
Rui Pereira
553 KiB
Assets (2)
Versions (8) View all
2.1.12 2026-11-20
2.1.11 2026-11-19
2.1.10 2026-11-19
2.1.9 2026-11-18
2.1.8 2026-10-17