obo.MailtoBuilder 1.0.5

dotnet add package obo.MailtoBuilder --version 1.0.5                
NuGet\Install-Package obo.MailtoBuilder -Version 1.0.5                
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="obo.MailtoBuilder" Version="1.0.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add obo.MailtoBuilder --version 1.0.5                
#r "nuget: obo.MailtoBuilder, 1.0.5"                
#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 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                

Nuget Nuget GitHub

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("[email protected]", "[email protected]", "[email protected]")
            .AddCc("[email protected]", "[email protected]")
            .AddBcc("[email protected]", "[email protected]")
            .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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last updated
1.0.5 198 4/18/2024
1.0.4 138 3/12/2024