VersaTul.Mailer
1.0.12
Prefix Reserved
See the version list below for details.
dotnet add package VersaTul.Mailer --version 1.0.12
NuGet\Install-Package VersaTul.Mailer -Version 1.0.12
<PackageReference Include="VersaTul.Mailer" Version="1.0.12" />
paket add VersaTul.Mailer --version 1.0.12
#r "nuget: VersaTul.Mailer, 1.0.12"
// Install VersaTul.Mailer as a Cake Addin #addin nuget:?package=VersaTul.Mailer&version=1.0.12 // Install VersaTul.Mailer as a Cake Tool #tool nuget:?package=VersaTul.Mailer&version=1.0.12
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 | 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. |
-
net8.0
- VersaTul.Configurations (>= 1.0.13)
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.