AugusteVN.Modules.Contact.Api
1.0.2
dotnet add package AugusteVN.Modules.Contact.Api --version 1.0.2
NuGet\Install-Package AugusteVN.Modules.Contact.Api -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AugusteVN.Modules.Contact.Api" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AugusteVN.Modules.Contact.Api" Version="1.0.2" />
<PackageReference Include="AugusteVN.Modules.Contact.Api" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AugusteVN.Modules.Contact.Api --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AugusteVN.Modules.Contact.Api, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AugusteVN.Modules.Contact.Api@1.0.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AugusteVN.Modules.Contact.Api&version=1.0.2
#tool nuget:?package=AugusteVN.Modules.Contact.Api&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AugusteVN.Modules.Contact.Api
Minimal API endpoint for contact form submissions with SMTP email delivery.
Part of the AugusteVN Modules collection.
Extension Methods
| Method | Description |
|---|---|
AddContactApi(IConfiguration) |
Registers FluentValidation validators, SmtpConfig options, and ISmtpMailer singleton |
MapContactEndpoints(IEndpointRouteBuilder) |
Maps the POST /Contact/ endpoint |
API Routes
| Method | Route | Description | Auth |
|---|---|---|---|
POST |
/Contact/ |
Sends a contact form email via SMTP | None |
POST /Contact/ — Sends a contact form email to the configured recipient address.
- Request body:
CreateContactRequest(Subject,Body,Name,Email) - Response:
204 No Contenton success,400 Bad Requeston failure
Registration
// Program.cs
using AugusteVN.Modules.Contact.Api;
// Register services (validators, SmtpConfig, ISmtpMailer)
builder.Services.AddContactApi(builder.Configuration);
// Map endpoints
app.MapContactEndpoints();
SMTP Configuration
Configure SMTP settings in appsettings.json:
{
"SmtpConfig": {
"Email": "recipient@example.com"
}
}
Dependencies
| Package | Version |
|---|---|
AugusteVN.MailKit.SmtpMailer |
1.1.2 |
FluentValidation.DependencyInjectionExtensions |
11.11.0 |
MailKit |
4.11.0 |
Installation
dotnet add package AugusteVN.Modules.Contact.Api
Related Packages
- Contact._Shared — Shared contracts, DTOs, route constants, and validators
- Contact._Shared.Spa — Blazor contact form component with CAPTCHA support
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- AugusteVN.MailKit.SmtpMailer (>= 1.2.0)
- AugusteVN.Modules.Contact._Shared (>= 1.0.2)
- FluentValidation.DependencyInjectionExtensions (>= 11.11.0)
- MailKit (>= 4.17.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.