MailKit.Custom 1.0.1

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package MailKit.Custom --version 1.0.1
NuGet\Install-Package MailKit.Custom -Version 1.0.1
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="MailKit.Custom" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MailKit.Custom --version 1.0.1
#r "nuget: MailKit.Custom, 1.0.1"
#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 MailKit.Custom as a Cake Addin
#addin nuget:?package=MailKit.Custom&version=1.0.1

// Install MailKit.Custom as a Cake Tool
#tool nuget:?package=MailKit.Custom&version=1.0.1

MailKit Custom

NuGet Nuget MIT Github Github

Installation

The library is available on NuGet.

Usage/Examples

An example of how to invoke the SendEmailAsync method

NOTE: It is possible to use both for the sender and for the recipient the short format (by evaluating the MITTENTE and DESTINATARIO fields) or the extended format (by evaluating the fields MITTENTENOMINATIVO, MITTENTEEMAIL, DESTINATARIONOMINATIVO and DESTINATARIOEMAIL).

Do NOT USE both formats, but choose only one type.

Model example

namespace MyProject;

public class InputMail
{
    public string Mittente { get; set; }
    public string Destinatario { get; set; }
    public string Oggetto { get; set; }                 //Required field
    public string Messaggio { get; set; }               //Required field
    public bool FormatoHtml { get; set; }               //Set to TRUE if you want to send emails in HTML format, otherwise leave it to FALSE
    public InputOptions mailOptions { get; set; }
    public InputExtender mailExtender { get; set; }
}

public partial class InputOptions
{
    public string Host { get; set; }                    //Required field
    public int Port { get; set; }                       //Required field
    public SecureSocketOptions Security { get; set; }   //Required field
    public string Username { get; set; }                //Mandatory field if the mail server requires authentication
    public string Password { get; set; }                //Mandatory field if the mail server requires authentication
}

public partial class InputExtender
{
    public string MittenteNominativo { get; set; }
    public string MittenteEmail { get; set; }
    public string DestinatarioNominativo { get; set; }
    public string DestinatarioEmail { get; set; }
}

Class example

namespace MyProject;

public class MyClass
{
  private readonly IEmailSenderService emailService;

  public MyClass(IEmailSenderService emailService)
  {
    this.emailService = emailService;
  }

  public async Task<IActionResult> InvioEmail([FromForm] InputMail model)
  {
      try
      {
          await emailService.SendEmailAsync(model);
          return Ok();
      }
      catch
      {
          throw new Exception();
      }
  }
}
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.

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