MailKit.Custom 1.0.2

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

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

MailKit Custom

NuGet Nuget MIT Github Github

Installation

The library is available on NuGet.

How to usage

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.

Example of use

Email Controller

using System;
using System.Threading.Tasks;
using MailKit.Custom.InputModels;
using MailKit.Custom.Services;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;

namespace MyProject.Controllers
{
    [ApiController]
    [Route("api/[controller]")]
    public class EmailController : ControllerBase
    {
        private readonly ILogger<EmailController> logger;
        private readonly IEmailSenderService emailService;

        public EmailController(ILogger<EmailController> logger, IEmailSenderService emailService)
        {
            this.logger = logger;
            this.emailService = emailService;
        }

        [HttpPost("InvioEmail")]
        public async Task<IActionResult> InvioEmail([FromForm] InputMailSender model)
        {
            try
            {
                await emailService.SendEmailAsync(model);
                return Ok();
            }
            catch
            {
                throw new Exception();
            }
        }
    }
}

*Method CONFIGURE class STARTUP

public void ConfigureServices(IServiceCollection services)
{
    //OMISSIS

    services.AddTransient<IEmailSenderService, MailKitEmailSender>();

    //OMISSIS
}
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