MailerSend.AspNetCore
ASP.NET Core library for MailerSend
Install / Use
/learn @vassilis-panos/MailerSend.AspNetCoreREADME
MailerSend.AspNetCore 
ASP.NET Core library for MailerSend
Installation
.NET CLI
dotnet add package MailerSend.AspNetCore
Package Manager
Install-Package MailerSend.AspNetCore
Configuration
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddMailerSend(options =>
{
options.ApiToken = "API-TOKEN";
options.SenderEmail = "mail@domain.com";
options.SenderName = "MailerSend";
});
}
}
appsettings.json
{
"MailerSend": {
"ApiToken": "API-TOKEN",
"SenderEmail": "mail@domain.com",
"SenderName": "MailerSend"
}
}
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.Configure<MailerSendOptions>(
Configuration.GetSection("MailerSend"));
services.AddMailerSend();
}
}
Dependency injection
public class EmailController : ControllerBase
{
private readonly MailerSendService _mailerSend;
public EmailController(MailerSendService mailerSend)
{
_mailerSend = mailerSend;
}
[HttpPost("send")]
public async Task<IActionResult> SendEmailAsync(CancellationToken ct)
{
var to = new List<Recipient>()
{
new Recipient()
{
Email = "user@domain.com",
Name = "User",
Substitutions = new Dictionary<string, string>()
{
{ "var1", "value1"},
{ "var2", "value2"}
}
}
};
await _mailerSend.SendMailAsync(
to, subject: "subject", text: "Test text", cancellationToken: ct);
return Ok();
}
}
Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
