CoreMailKit 2025.5.23

There is a newer version of this package available.
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" />
                    
Directory.Packages.props
<PackageReference Include="CoreMailKit" />
                    
Project file
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
                    
#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
                    
Install as a Cake Addin
#tool nuget:?package=CoreMailKit&version=2025.5.23
                    
Install as a Cake Tool

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

  1. Configuración Flexible

    • Configuración de SMTP
    • Soporte para SSL/TLS
    • Manejo de credenciales
    • Configuración de puertos
  2. Destinatarios

    • Soporte para múltiples destinatarios
    • Copias (CC)
    • Copias ocultas (BCC)
    • Manejo de listas de correo
  3. Adjuntos

    • Soporte para múltiples adjuntos
    • Manejo de archivos
    • Validación de tipos de archivo
  4. 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 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2025.7.13 113 7/14/2025
2025.5.23 64 5/23/2025
2025.5.1 135 5/1/2025
2025.4.30 121 4/30/2025
2025.3.22 144 3/22/2025
2025.3.8 108 3/9/2025
2025.2.7 88 2/8/2025
2025.2.3 91 2/2/2025
2025.2.2 104 2/2/2025
2024.2.18 116 2/24/2024