obo.MailtoBuilder
1.0.5
dotnet add package obo.MailtoBuilder --version 1.0.5
NuGet\Install-Package obo.MailtoBuilder -Version 1.0.5
<PackageReference Include="obo.MailtoBuilder" Version="1.0.5" />
paket add obo.MailtoBuilder --version 1.0.5
#r "nuget: obo.MailtoBuilder, 1.0.5"
// Install obo.MailtoBuilder as a Cake Addin #addin nuget:?package=obo.MailtoBuilder&version=1.0.5 // Install obo.MailtoBuilder as a Cake Tool #tool nuget:?package=obo.MailtoBuilder&version=1.0.5
MailtoBuilder
MailtoBuilder is a C# library for building mailto links easily. It allows you to construct mailto links with recipients, CC, BCC, subject, and body.
Installation
You can install MailtoBuilder via NuGet Package Manager:
dotnet add package obo.MailtoBuilder
Usage
using MailtoBuilder;
class Program
{
static void Main(string[] args)
{
var mailtoLink = MailtoBuilder.Create()
.AddRecipients("example1@example.com", "example2@example.com", "example3@example.com")
.AddCc("cc1@example.com", "cc2@example.com")
.AddBcc("bcc1@example.com", "bcc2@example.com")
.SetSubject("Hello")
.SetBody("This is a test email.")
.ToString();
Console.WriteLine(mailtoLink);
}
}
API
MailtoBuilder.Create()
Creates a new instance of the MailtoBuilder
.
MailtoBuilder.AddRecipients(params string[] recipients)
Adds recipients to the mailto link.
MailtoBuilder.AddCc(params string[] ccRecipients)
Adds CC recipients to the mailto link.
MailtoBuilder.AddBcc(params string[] bccRecipients)
Adds BCC recipients to the mailto link.
MailtoBuilder.SetSubject(string subject)
Sets the subject of the email.
MailtoBuilder.SetBody(string body)
Sets the body of the email.
MailtoBuilder.ToString()
Converts the configured mailto link to a string.
License
This project is licensed under the MIT License.
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
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.