Configures SMTP email delivery in Orchard Core, covering SmtpSettings, MailKit-based providers, pickup directories, encryption, proxies, and migration from legacy ISmtpService to IEmailService.
Ships in orchardcore. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
OrchardCore.Email.Smtp supplies the tenant SMTP provider and the
configuration-backed DefaultSMTP provider, both built on MailKit.
Application code uses IEmailService (see orchardcore-email), not an
SMTP-specific service.
SMTP)Enable the module and configure the SMTP tab of Settings → Communication → Email. Select the enabled SMTP provider as the email default when more than one provider is enabled; enabling the only provider selects it automatically.
{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.Email",
"OrchardCore.Email.Smtp"
]
},
{
"name": "Settings",
"SmtpSettings": {
"IsEnabled": true,
"DefaultSender": "[email protected]",
"Host": "smtp.example.com",
"Port": 587,
"AutoSelectEncryption": false,
"EncryptionMethod": "StartTls",
"RequireCredentials": true,
"UseDefaultCredentials": false,
"UserName": "smtp-user",
"DeliveryMethod": "Network"
},
"EmailSettings": {
"DefaultProviderName": "SMTP"
}
}
]
}
| Setting | Notes |
|---|---|
IsEnabled, DefaultSender | The sender is used when MailMessage.From/Sender are empty. |
Host, Port | Port defaults to 25. Host is required for Network delivery. |
EncryptionMethod, AutoSelectEncryption | None, SslTls, or StartTls. |
RequireCredentials, UseDefaultCredentials, UserName, Password | The admin UI encrypts Password with Data Protection, so enter it there rather than in a recipe. |
PasswordSecretName | 4.0. Name of a TextSecret holding the password; takes precedence over Password. |
ProxyHost, ProxyPort | Required when the SMTP server is reached through a proxy. |
IgnoreInvalidSslCertificate | Development and test servers only. |
DeliveryMethod, PickupDirectoryLocation | Network or SpecifiedPickupDirectory. |
DefaultSMTP)DefaultSmtpOptions binds OrchardCore:Email:Smtp. The provider appears only
when the section has a DefaultSender and either a Host or pickup delivery;
it cannot be edited in the admin UI.
{
"OrchardCore": {
"Email": {
"Smtp": {
"DefaultSender": "[email protected]",
"DeliveryMethod": "Network",
"Host": "smtp.example.com",
"Port": 587,
"EncryptionMethod": "StartTls",
"AutoSelectEncryption": false,
"UseDefaultCredentials": false,
"RequireCredentials": true,
"UserName": "smtp-user",
"Password": "supply-from-a-secret-store"
}
}
}
}
Supply secrets through environment variables or a key vault, for example
OrchardCore__Email__Smtp__Password. In 4.0 a nonblank Password here logs a
LegacySecretConfiguration warning (event 8100). DefaultSmtpOptions has no
secret reference, so to keep the password in the Secrets module use the tenant
SMTP provider with PasswordSecretName instead.
The SMTP settings render the password with the <secret-input> editor. Without
the OrchardCore.Secrets feature it is protected in SmtpSettings.Password, as
before. With it, choose Use a secret and pick or create a TextSecret
(suggested name Smtp.Password); PasswordSecretName then wins and the
protected password is cleared when saved. An existing password can be moved
without retyping it from Tools → Security → Migrate Secrets. In a recipe,
create the secret with the Secrets step (value from the
OrchardCore__Secrets__Smtp.Password environment variable) and set
"PasswordSecretName": "Smtp.Password" in SmtpSettings. SmtpOptions.Password
is resolved from the secret first, then from the protected value. See
orchardcore-secrets.
Set DeliveryMethod to SpecifiedPickupDirectory to write .eml files
instead of sending. PickupDirectoryLocation must be / or a relative
subfolder such as /Outbound; absolute paths, invalid characters, and ..
segments are rejected. It is resolved under PickupDirectoryLocationBase, a
configuration-only setting that supports Fluid and defaults to
{{ AppData }}\Sites\{{ ShellSettings.Name }}\Emails. The base applies to both
the tenant and the default provider.
{
"OrchardCore": {
"Email": {
"Smtp": {
"DefaultSender": "[email protected]",
"DeliveryMethod": "SpecifiedPickupDirectory",
"PickupDirectoryLocationBase": "{{ AppData }}\\Drops\\{{ ShellSettings.Name }}",
"PickupDirectoryLocation": "/Outbound"
}
}
}
}
using OrchardCore.Email;
using OrchardCore.Infrastructure;
namespace MyModule;
public sealed class ReceiptService
{
private readonly IEmailService _emailService;
public ReceiptService(IEmailService emailService)
{
_emailService = emailService;
}
public Task<Result> SendAsync(string recipient, CancellationToken cancellationToken = default)
{
return _emailService.SendAsync(new MailMessage
{
To = recipient,
Subject = "Receipt",
HtmlBody = "<p>Your receipt is ready.</p>",
TextBody = "Your receipt is ready.",
}, cancellationToken: cancellationToken);
}
}
Test a selected enabled provider at Tools → Testing → Email Test.
SmtpOptions is rebuilt from site settings after each committed change, so
read it with IOptionsMonitor<SmtpOptions>.CurrentValue. To add another
SMTP-based provider, derive from SmtpEmailProviderBase<TOptions> where
TOptions : SmtpOptions:
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options;
using OrchardCore.Email;
using OrchardCore.Email.Smtp.Services;
namespace MyModule;
public sealed class MarketingSmtpOptions : SmtpOptions;
public sealed class MarketingSmtpEmailProvider : SmtpEmailProviderBase<MarketingSmtpOptions>
{
public const string TechnicalName = "MarketingSMTP";
public MarketingSmtpEmailProvider(
IOptionsMonitor<MarketingSmtpOptions> options,
IEmailAddressValidator emailAddressValidator,
ILogger<MarketingSmtpEmailProvider> logger,
IStringLocalizer<MarketingSmtpEmailProvider> stringLocalizer)
: base(options, emailAddressValidator, logger, stringLocalizer)
{
}
public override LocalizedString DisplayName => S["Marketing SMTP"];
}
Configure MarketingSmtpOptions (for example by binding a configuration
section and setting IsEnabled = options.ConfigurationExists()), then add the
provider with services.AddEmailProvider<MarketingSmtpEmailProvider>(MarketingSmtpEmailProvider.TechnicalName)
or an IConfigureOptions<EmailProviderOptions> registered with
AddEmailProviderOptionsConfiguration<T>(). Reference the
OrchardCore.Email.Smtp package from the module that contains the provider.
OrchardCore_Email_Smtp and OrchardCore_Email sections →
OrchardCore:Email:Smtp (old names still bind but are deprecated).IOptions<SmtpOptions> → IOptionsMonitor<SmtpOptions>.CurrentValue.class MyProvider : SmtpEmailProviderBase with an SmtpOptions constructor
argument → SmtpEmailProviderBase<TOptions> with
IOptionsMonitor<TOptions>.ISmtpService, SmtpResult, MailKitSmtpService, Body, and IsHtmlBody
are obsolete; use IEmailService, Result, HtmlBody, and TextBody.SmtpSettings gains PasswordSecretName;
code reading SmtpSettings.Password directly must honor it (read
IOptionsMonitor<SmtpOptions> or call IServiceProvider.GetSecretValueAsync()),
because moving the password to a secret clears Password.OrchardCore:Email:Smtp:Password (and the legacy sections) still works but
logs LegacySecretConfiguration; remove it once the password lives in a secret.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/orchardcore:orchardcore-email-smtpfrom orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin orchardcore140 skills in this plugin
/orchardcore-adminGuidance for the Orchard Core admin panel, including admin controllers and routes, admin menu registration with AdminNavigationProvider, ocat editor forms grouped in cards, admin pages rendering Model.Editor, the UI text casing standard, TheAdmin layout and menu colors, admin branding, the Navbar shape, the Ctrl+K quick navigation palette and QuickNavigationSource, AdminSettings such as MenuBehavior, ShowBreadcrumb, DisplayQuickNavigation, DisplayTitlesInTopbar and ActionsLayout, the AdminDashboard shape, settings pages, and admin filters and zones. Use this skill when requests mention the Orchard Core admin panel, TheAdmin, admin controllers, admin menu registration, an icon on an admin menu item, the AdminSettings recipe step, quick navigation, navigation menu behavior, the admin URL prefix, UI text casing. Strong matches include OrchardCore.Admin, AdminSettings, AdminPermissions, AdminOptions, AdminAttribute, SiteDisplayDriver, IDisplayManager./orchardcore-admin-dashboardSkill for creating admin dashboard widgets in Orchard Core. Covers the DashboardWidget stereotype, DashboardPart position and sizing, the built-in HtmlDashboardWidget, ContentsMetadata and ContentsTags widget types, custom widget content types via recipe or migration, arranging widgets in Manage Dashboard mode, widget template customization, provisioning widgets with recipes, dashboard permissions, the DashboardBreadcrumbProvider Dashboard ancestor, and the AdminDashboardContent shape used when the feature is disabled. Use this skill when requests mention Orchard Core Admin Dashboard, Create and Configure Dashboard Widgets, Enabling Admin Dashboard, Widget Configuration Properties, dashboard widget recipes, Dashboard breadcrumb, or related implementation, setup, or troubleshooting work. Strong matches include OrchardCore.AdminDashboard, DashboardPart, DashboardBreadcrumbProvider, AccessAdminDashboard, ManageAdminDashboard.Other plugins' skills for the same job