VersaTul.Mailer 1.0.15

Prefix Reserved
dotnet add package VersaTul.Mailer --version 1.0.15                
NuGet\Install-Package VersaTul.Mailer -Version 1.0.15                
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="VersaTul.Mailer" Version="1.0.15" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VersaTul.Mailer --version 1.0.15                
#r "nuget: VersaTul.Mailer, 1.0.15"                
#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.
// Install VersaTul.Mailer as a Cake Addin
#addin nuget:?package=VersaTul.Mailer&version=1.0.15

// Install VersaTul.Mailer as a Cake Tool
#tool nuget:?package=VersaTul.Mailer&version=1.0.15                

VersaTul Mailer

VersaTul Mailer is a project that provides the functionality to send email messages using the SMTP protocol.

Features

  • Send SMTP emails to receiver as raw text or HTML with or without attachments
  • Configure various settings for the mailing application
  • Use different implementations of SMTP clients

Installation

To install VersaTul Mailer, you can from NuGet using the following command:

PM> NuGet\Install-Package VersaTul.Mailer -Version latest

Usage

To use VersaTul Mailer, you need to create an instance of the MailDispatcher class and pass it an IMailConfiguration and an ISmtpClient. Then, you can call the SendMail method to send an email message.

For example:

// Create a mail configuration
IMailConfiguration mailConfig = new MailConfiguration();
mailConfig.From = "sender@example.com";
mailConfig.To = "receiver@example.com";
mailConfig.Subject = "Test email";
mailConfig.Body = "Hello, this is a test email.";
mailConfig.IsBodyHtml = false;

// Create an SMTP client
ISmtpClient smtpClient = new SmtpClientWrapper();
smtpClient.Host = "smtp.example.com";
smtpClient.Port = 25;
smtpClient.EnableSsl = true;
smtpClient.Credentials = new NetworkCredential("username", "password");

// Create a mail dispatcher
IMailDispatcher mailDispatcher = new MailDispatcher(mailConfig, smtpClient);

// Send the email
mailDispatcher.SendMail();

Configuration

You can configure various settings for the mailing application by modifying the app.config file or passing a custom configuration file to the MailConfiguration constructor.

The configuration settings include:

  • From: The email address of the sender
  • To: The email address of the receiver
  • Cc: The email address of the carbon copy receiver
  • Bcc: The email address of the blind carbon copy receiver
  • Subject: The subject of the email
  • Body: The body of the email
  • IsBodyHtml: A boolean value indicating whether the body is HTML or plain text
  • Attachments: A list of file paths of the attachments
  • Encoding: The encoding of the email
  • Priority: The priority of the email
  • DeliveryNotificationOptions: The delivery notification options of the email

See Configuration Defaults for more information.

License

VersaTul Mailer is licensed under the MIT License. See LICENSE for more details.

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on VersaTul.Mailer:

Package Downloads
VersaTul.Collection.Streamers

The VersaTul Collection Streamers provides functionality that enables developers to quickly convert a collection of objects in memory into a data-reader that can be used for Bulk inserting data into a SQL Database, or be used to generate flat files. Developers can use the streamers to: 1. Convert a Collection to a Data-Reader. 2. Convert from a Data-Reader to other file formats such as CSV, TAB or Json. 3. Compress converted data into Zip files. 4. Transport the converted data via e-mail. The Streamers project also works with Display Attributes which is used to manipulate the properties on the objects in the collection such as formatting the data or renaming the property with a desired display name.

VersaTul.Logger.Mail

The VersaTul Logger Mail project provides the functionality needed to performing logging to a email address or addresses. This project implements the ILogger interface from the VersaTul Logger project. There is also a dependency on the VersaTul Mailer project, which is used to send emails.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.15 119 12/10/2024
1.0.14 251 4/5/2024
1.0.13 139 4/4/2024
1.0.12 164 4/4/2024
1.0.11 169 3/1/2024
1.0.10 156 2/1/2024
1.0.9 266 1/15/2024
1.0.8 203 1/11/2024
1.0.7 321 7/22/2023