16 lines
514 B
C#
16 lines
514 B
C#
|
using Correo.Abstractions;
|
|||
|
using Correo.MailKit.Models;
|
|||
|
using Microsoft.Extensions.Configuration;
|
|||
|
using Microsoft.Extensions.DependencyInjection;
|
|||
|
|
|||
|
namespace Correo.MailKit
|
|||
|
{
|
|||
|
public static class DependencyInjectionExtensions
|
|||
|
{
|
|||
|
public static void AddMailKitSmtpClient(this IServiceCollection services, IConfigurationSection configuration)
|
|||
|
{
|
|||
|
services.Configure<SmtpClientOptions>(configuration);
|
|||
|
services.AddTransient<IMailer, MailKitSmtpClient>();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|