2023-01-19 19:45:00 +02:00
|
|
|
|
using Correo.Abstractions;
|
|
|
|
|
using Correo.MailKit.Models;
|
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
|
|
|
|
namespace Correo.MailKit
|
|
|
|
|
{
|
|
|
|
|
public static class DependencyInjectionExtensions
|
|
|
|
|
{
|
2023-01-21 04:25:44 +02:00
|
|
|
|
public static void AddMailKitSmtpClient(this IServiceCollection services, IConfiguration configuration)
|
2023-01-19 19:45:00 +02:00
|
|
|
|
{
|
|
|
|
|
services.Configure<SmtpClientOptions>(configuration);
|
|
|
|
|
services.AddTransient<IMailer, MailKitSmtpClient>();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|