CoreMailKit 2025.5.23
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Framework 4.8
This package targets .NET Framework 4.8. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CoreMailKit --version 2025.5.23
NuGet\Install-Package CoreMailKit -Version 2025.5.23
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="CoreMailKit" Version="2025.5.23" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoreMailKit" Version="2025.5.23" />
<PackageReference Include="CoreMailKit" />
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 CoreMailKit --version 2025.5.23
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CoreMailKit, 2025.5.23"
#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 CoreMailKit@2025.5.23
#: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=CoreMailKit&version=2025.5.23
#tool nuget:?package=CoreMailKit&version=2025.5.23
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CoreMailKit
Una biblioteca especializada para el envío de correos electrónicos en .NET utilizando MailKit, con soporte para múltiples destinatarios, copias, adjuntos y configuración flexible.
Características Principales
Configuración Flexible
- Configuración de SMTP
- Soporte para SSL/TLS
- Manejo de credenciales
- Configuración de puertos
Destinatarios
- Soporte para múltiples destinatarios
- Copias (CC)
- Copias ocultas (BCC)
- Manejo de listas de correo
Adjuntos
- Soporte para múltiples adjuntos
- Manejo de archivos
- Validación de tipos de archivo
Características de Email
- Soporte para HTML
- Manejo de codificación
- Limpieza automática de recursos
- Manejo de excepciones
Instalación
El paquete se puede instalar usando NuGet:
dotnet add package DotNet.CoreMailKit
También está disponible en el Visual Studio Package Manager:
Install-Package DotNet.CoreMailKit
Uso Básico
// Configuración del servicio de correo
var mailKitSetting = new MailKitSetting
{
Servidor = "smtp.example.com",
Puerto = 587,
Cuenta = "usuario@example.com",
Contrasena = "password",
HabilitarSSL = true
};
// Crear instancia del servicio
var emailService = new EmailService();
// Configurar el servicio
emailService.SetMailKitSetting(mailKitSetting);
// Agregar destinatarios
emailService.AddRecipient("destinatario@example.com");
emailService.AddRecipientWithCopy("copia@example.com");
emailService.AddRecipientWithCopyBlind("copia-oculta@example.com");
// Agregar adjuntos
emailService.Attachments(collection =>
{
collection.Add(new Attachment("archivo.pdf"));
});
// Enviar correo
bool enviado = emailService.Send(
subject: "Asunto del correo",
body: "<h1>Mensaje en HTML</h1><p>Contenido del correo</p>"
);
// El servicio se limpia automáticamente después de cada envío
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
.NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
-
net8.0
-
net9.0
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.