Skip to content

Send emails with FluentEmail (fork from @jcamp-code) via MailerSend using their REST API.

License

Notifications You must be signed in to change notification settings

marcoatribeiro/FluentEmail.MailerSend.jcamp

Repository files navigation

FluentEmail.MailerSend

Nuget

This library enables you to use Mailersend as a sender for FluentEmail (fork from @jcamp-code).

Getting Started

Install from NuGet

PM> Install-Package FluentEmail.MailerSend

Basic Usage

Email.DefaultSender = new MailerSendSender("MAILSENDER_API_TOKEN");

var response = await Email
    .From("[email protected]", "Sender Name")
    .To("[email protected]")
    .Subject("E-mail subject")
    .Body("Greetings! This message was sent through MailerSend.")
    .SendAsync();

Dependency Injection

public void ConfigureServices(IServiceCollection services)
{
    // ...

    services.AddFluentEmail("[email protected]")
            .AddRazorRenderer()
            .AddMailerSendSender("MAILSENDER_API_TOKEN", options => 
            {
                options.SendAt = DateTime.Now.AddHours(1);
            });

    // ...
}

About

Send emails with FluentEmail (fork from @jcamp-code) via MailerSend using their REST API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages