Latest commit 19208ea Feb 7, 2017 @lukencode bumped nuget version


alt text

FluentEmail - All in one email sender for .NET and .NET Core

Send email from .NET or .NET Core. A bunch of useful extension packages make this dead simple and very powerful.


FluentEmail.Core - Just the domain model. Includes very basic defaults, but is also included with every other package here.

FluentEmail.Smtp - Now we're talking. Send emails via SMTP. At the moment, only works on .NET 4.

FluentEmail.Razor - Generate emails using Razor templates. Anything you can do in ASP.NET is possible here. Uses the RazorLight project under the hood.

FluentEmail.Mailgun - Send emails via MailGun's REST API. Works with .NET Core :)


You can choose which renderer and sender you would like to use, or build your own inheriting from ITemplateRenderer and ISender.

Example usage from:

var email = Email
        .To("bob@email.com", "bob")
        .Subject("hows it going bob")
        .Body("yo dawg, sup?");

Templates usage:

// Using Razor templating package
Email.DefaultRenderer = new RazorRenderer();

var template = "Dear @Model.Name, You are totally @Model.Compliment.";

var email = Email
    .Subject("woo nuget")
    .UsingTemplate(template, new { Name = "Luke", Compliment = "Awesome" });


// Using Smtp Sender package
Email.DefaultSender = new SmtpSender();

//send normally

//send asynchronously
await email.SendAsync();