Giter Club home page Giter Club logo

fluentemail's Introduction

alt text

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

The easiest way to send email from .NET and .NET Core. Use Razor for email templates and send using SendGrid, MailGun, SMTP and more.

Maintained by Luke Lowrey - follow me on twitter @lukencode for updates. See my blog for a detailed guide A complete guide to send email in .NET

Nuget Packages

Core Library

  • FluentEmail.Core - Just the domain model. Includes very basic defaults, but is also included with every other package here.
  • FluentEmail.Smtp - Send email via SMTP server.

Renderers

Mail Provider Integrations

Basic Usage

var email = await Email
    .From("[email protected]")
    .To("[email protected]", "bob")
    .Subject("hows it going bob")
    .Body("yo bob, long time no see!")
    .SendAsync();

Dependency Injection

Configure FluentEmail in startup.cs with these helper methods. This will inject IFluentEmail (send a single email) and IFluentEmailFactory (used to send multiple emails in a single context) with the ISender and ITemplateRenderer configured using AddRazorRenderer(), AddSmtpSender() or other packages.

public void ConfigureServices(IServiceCollection services)
{
    services
        .AddFluentEmail("[email protected]")
        .AddRazorRenderer()
        .AddSmtpSender("localhost", 25);
}

Example to take a dependency on IFluentEmail:

public class EmailService {

   private IFluentEmail _fluentEmail;

   public EmailService(IFluentEmail fluentEmail) {
     _fluentEmail = fluentEmail;
   }

   public async Task Send() {
     await _fluentEmail.To("[email protected]")
     .Body("The body").SendAsync();
   }
}

Using a Razor template

// Using Razor templating package (or set using AddRazorRenderer in services)
Email.DefaultRenderer = new RazorRenderer();

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

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

Using a Liquid template

Liquid templates are a more secure option for Razor templates as they run in more restricted environment. While Razor templates have access to whole power of CLR functionality like file access, they also are more insecure if templates come from untrusted source. Liquid templates also have the benefit of being faster to parse initially as they don't need heavy compilation step like Razor templates do.

Model properties are exposed directly as properties in Liquid templates so they also become more compact.

See Fluid samples for more examples.

// Using Liquid templating package (or set using AddLiquidRenderer in services)

// file provider is used to resolve layout files if they are in use
var fileProvider = new PhysicalFileProvider(Path.Combine(someRootPath, "EmailTemplates"));
var options = new LiquidRendererOptions
{
    FileProvider = fileProvider
};

Email.DefaultRenderer = new LiquidRenderer(Options.Create(options));

// template which utilizes layout
var template = @"
{% layout '_layout.liquid' %}
Dear {{ Name }}, You are totally {{ Compliment }}.";

var email = Email
    .From("[email protected]")
    .To("[email protected]")
    .Subject("woo nuget")
    .UsingTemplate(template, new ViewModel { Name = "Luke", Compliment = "Awesome" });

Sending Emails

// Using Smtp Sender package (or set using AddSmtpSender in services)
Email.DefaultSender = new SmtpSender();

//send normally
email.Send();

//send asynchronously
await email.SendAsync();

Template File from Disk

var email = Email
    .From("[email protected]")
    .To("[email protected]")
    .Subject("woo nuget")
    .UsingTemplateFromFile($"{Directory.GetCurrentDirectory()}/Mytemplate.cshtml", new { Name = "Rad Dude" });

Embedded Template File

Note for .NET Core 2 users: You'll need to add the following line to the project containing any embedded razor views. See this issue for more details.

<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
var email = new Email("[email protected]")
	.To("[email protected]")
	.Subject("Hey cool name!")
	.UsingTemplateFromEmbedded("Example.Project.Namespace.template-name.cshtml", 
		new { Name = "Bob" }, 
		TypeFromYourEmbeddedAssembly.GetType().GetTypeInfo().Assembly);

fluentemail's People

Contributors

0xced avatar anthonyvscode avatar bjcull avatar carael avatar computamike avatar dapug avatar dkarzon avatar dominikheeb avatar erwan-joly avatar foxite avatar hakanl avatar igx89 avatar jafin avatar jamesfernandes avatar kevinsawicki avatar kreghek avatar lahma avatar leon99 avatar lukencode avatar lyphtec avatar marcells avatar mickeyr avatar mihaj avatar mtrutledge avatar nhambayi avatar olibanjoli avatar rms81 avatar she2 avatar simoncropp avatar viktorsteinwand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fluentemail's Issues

Using Default with SSL

When using the default email configuration from web.config, the ssl setting is getting overrided on sending.
It should have an flag that we are using the default configuration and do not override the ssl configuration.

How to disable SSL on SMTP?

ERROR U4HDRedSpaceBusinessLogic.Controllers.HDManagerAppController - failed to send password notification
System.Net.Mail.SmtpException: SSL non deve essere abilitato per i metodi di invio tramite directory di prelievo.
in System.Net.Mail.SmtpClient.SendAsync(MailMessage message, Object userToken)
in System.Net.Mail.SmtpClient.SendMailAsync(MailMessage message)
in FluentEmail.Smtp.SmtpSender.d__8.MoveNext()

Bulk Emailing

Add as SendAsBulk method to efficiently and asynchronously send bulk emails.

Code license?

I really like this project, however some people are restricted to only using code that has an explicit license. If you don't specify a license, copyright is implied and the fear is that you can legally get people to stop using your code despite the fact that you've made it public on Github. Silly, I know. It's better explained by Jeff Atwood.

Can't install package on .NET 4.0 target

When I try to install FluentEmail.Smtp, I get the following error:
Could not install package 'FluentEmail.Smtp 2.0.4'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
And when I look at the package, I understand: there is only a net451 folder, so currently the package can not be installed on .NET 4.0 targetting applications.
If you place the assemblies in a 'net40' folder, it will do the trick ๐Ÿ˜„

Dispose and sendasync

hi,
is the email message disposed when sending asynchronously, if not where is the best place to handle that ?

thanks in advanced.

Trying to install nuget FluentEmail.Razor on Framework 4.6.1

I'm getting this:
Could not install package 'FluentEmail.Razor 2.0.3'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Do I need to change my target framework?
My understanding was .NET-Standard is included in .NET-Framwork 4.6. Am I wrong?
https://github.com/dotnet/standard/blob/master/docs/versions.md

SmtpSender disposes itself after first send

I'm using Email.DefaultSender to set up SmtpSender as the sender, but upon the first send the SmtpClient object in SmtpSender is disposed, preventing any further sends until I set Email.DefaultSender to a new SmtpSender object.

That behavior is definitely not intentional I'm guessing? The root cause appears to be that SmtpSender is calling its own Dispose method after it sends an email (!).

Code to reproduce:

Email.DefaultSender = new SmtpSender();

Email
        .From("[email protected]")
        .To("[email protected]", "bob")
        .Subject("hows it going bob")
        .Body("yo dawg, sup?")
	.Send();

Email
        .From("[email protected]")
        .To("[email protected]", "bob")
        .Subject("hows it going bob")
        .Body("yo dawg, sup?")
	.Send();
// throws ObjectDisposedException

System.ArgumentException: The UNC path should be of the form \\\\server\\share.

Hi , I just simply use the default Razor Renderer send email function, following are my snippet code. But I get an exception error "The UNC path should be of the form \\server\share...."

Any idea?
Please help, thanks.

` Email.DefaultRenderer = new RazorRenderer();

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

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

            await email.SendAsync();`

Not effective template keys replacement

I think that it would be much more effective to construct Regex with combined keys (somthing like "<%Author%>|<%Title%>|<%Description%>") and call .Replace method only once. There must be just one pass through entire template string.

How do I disable encoding?

I'm using the UsingTemplateFromFile() and a simple string property @Model.Body, however my body has html. Its currently encoding the output. I cannot use @Html.Raw() because its not available in RazorLight. My string is not encoded when passing to the UsingTemplateFromFile method. How do I force this to not encode my output?

Subject via Razor

If I want to use a Razor template for the subject, how can I do that?

Error adding FluentEmail.Razor from nuget

Attempting to add FluentEmail.Razor to a .NET Framework 4.6.1 project using nuget results in the following error:

Unable to find a version of 'RazorLight' that is compatible with 'FluentEmail.Razor 2.3.2 constraint: RazorLight (>= 2.0.0-alpha3)'.

A Mandrill sender

I'm migrating a mvc5 app to mvc core using the Core 2 Web project template. I'd love to add a Mandrill sender project but looking like there's going to be dependency issues. When I open the FluentEmail in VS2017, clean and build I'm getting a whole slew of 'Detected package downgrade' messages. Any actions i should be taking before an initial build?

Method not found: 'Void Microsoft.Extensions.Caching.Memory.MemoryCacheOptions.set_CompactOnMemoryPressure(Boolean)'.

Get this error with below code using SendGrid. Running from Class Library Targeting Dot Net Standard 2.0 with Dot Net Core 2.0 Caller

Here is code

       var sender = new SendGridSender(_appConfiguration.Value.SendGridApiKey);
                Email.DefaultSender = sender;
                Email.DefaultRenderer = new RazorRenderer();

                var template = "Dear @Model.Email, Thank you for signing, here is the url @Model.SiteUrl";


                var email = Email.From(_appConfiguration.Value.NoReplyEmail)
                                 .To(model.Email)
                                 .Subject("Welcome to LevinBlog!")
                                 .UsingTemplate(template, new { Email = model.Email, SiteUrl = _appConfiguration.Value.SiteUrl });


And Stack Trace

   at RazorLight.Caching.TrackingCompilerCache..ctor(String root)
   at RazorLight.EngineFactory.CreatePhysical(String root, IEngineConfiguration configuration)
   at RazorLight.EngineFactory.CreatePhysical(String root)
   at FluentEmail.Razor.RazorRenderer.Parse[T](String template, T model, Boolean isHtml)
   at FluentEmail.Core.Email.UsingTemplate[T](String template, T model, Boolean isHtml)
   at Service.CommunicationService.SignUpToMailingList(SignUpViewModel model) in Service\CommunicationService.cs:line 83
   at Web.Server.Controllers.Rest.ContactsController.Send(SignUpViewModel model) in Web\Server\Controllers\Rest\ContactsController.cs:line 29
   at Microsoft.AspNetCore.Mvc.Internal.ObjectMethodExecutor.<>c__DisplayClass35_0.<WrapVoidAction>b__0(Object target, Object[] parameters)
   at Microsoft.AspNetCore.Mvc.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__18.MoveNext()


Core ConsoleApp having Runtime Errors compiling Razor Template

I'm using Visual Studio 2017 15.5 and I have created a Core Console App, added the FluentEmail.Razor project and written this program.cs

class Program
{
    static void Main(string[] args)
    {
        RazorRenderer razorRenderer = new RazorRenderer();
        string template = "Hello @Model.Name. Welcome to @Model.Title repository";
        string result = razorRenderer.ParseAsync(template, new { Name = "Chris", Title = "MyRepo" }).GetAwaiter().GetResult();
        Console.WriteLine(result);
        Console.ReadKey();
    }
}

Here is my csproj

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="FluentEmail.Razor" Version="2.3.2" />
  </ItemGroup>
</Project>

I got this error:

RazorLight.TemplateCompilationException
  HResult=0x80131500
  Message=Failed to compile generated Razor template:
- (3:29) The type or namespace name 'Razor' does not exist in the namespace 'RazorLight' (are you missing an assembly reference?)
- (3:63) Predefined type 'System.String' is not defined or imported
- (3:104) Predefined type 'System.Type' is not defined or imported
- (7:10) The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
- (8:10) The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
- (9:10) The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
- (10:10) The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
- (11:56) The type or namespace name 'TemplatePage<>' does not exist in the namespace 'RazorLight' (are you missing an assembly reference?)
- (11:69) Cannot define a class or member that utilizes 'dynamic' because the compiler required type 'System.Runtime.CompilerServices.DynamicAttribute' cannot be found. Are you missing a reference?
- (11:69) Predefined type 'System.Boolean' is not defined or imported
- (14:66) The return type of an async method must be void, Task or Task<T>
- (14:38) The type or namespace name 'System' could not be found in the global namespace (are you missing an assembly reference?)
- (14:66) 'GeneratedTemplate.ExecuteAsync()': no suitable method found to override
- (16:12) Predefined type 'System.Object' is not defined or imported
- (16:12) The name 'BeginContext' does not exist in the current context
- (16:25) Predefined type 'System.Int32' is not defined or imported
- (16:28) Predefined type 'System.Int32' is not defined or imported
- (16:31) Predefined type 'System.Boolean' is not defined or imported
- (17:12) Predefined type 'System.Object' is not defined or imported
- (17:12) The name 'WriteLiteral' does not exist in the current context
- (17:25) Predefined type 'System.String' is not defined or imported
- (18:12) Predefined type 'System.Object' is not defined or imported
- (18:12) The name 'EndContext' does not exist in the current context
- (19:12) Predefined type 'System.Object' is not defined or imported
- (19:12) The name 'BeginContext' does not exist in the current context
- (19:25) Predefined type 'System.Int32' is not defined or imported
- (19:28) Predefined type 'System.Int32' is not defined or imported
- (19:32) Predefined type 'System.Boolean' is not defined or imported
- (0:1) Predefined type 'System.Object' is not defined or imported
- (0:1) The name 'Write' does not exist in the current context
- (0:7) Predefined type 'System.Object' is not defined or imported
- (0:7) The name 'Model' does not exist in the current context
- (25:12) Predefined type 'System.Object' is not defined or imported
- (25:12) The name 'EndContext' does not exist in the current context
- (26:12) Predefined type 'System.Object' is not defined or imported
- (26:12) The name 'BeginContext' does not exist in the current context
- (26:25) Predefined type 'System.Int32' is not defined or imported
- (26:29) Predefined type 'System.Int32' is not defined or imported
- (26:33) Predefined type 'System.Boolean' is not defined or imported
- (27:12) Predefined type 'System.Object' is not defined or imported
- (27:12) The name 'WriteLiteral' does not exist in the current context
- (27:25) Predefined type 'System.String' is not defined or imported
- (28:12) Predefined type 'System.Object' is not defined or imported
- (28:12) The name 'EndContext' does not exist in the current context
- (29:12) Predefined type 'System.Object' is not defined or imported
- (29:12) The name 'BeginContext' does not exist in the current context
- (29:25) Predefined type 'System.Int32' is not defined or imported
- (29:29) Predefined type 'System.Int32' is not defined or imported
- (29:33) Predefined type 'System.Boolean' is not defined or imported
- (0:25) Predefined type 'System.Object' is not defined or imported
- (0:25) The name 'Write' does not exist in the current context
- (0:31) Predefined type 'System.Object' is not defined or imported
- (0:31) The name 'Model' does not exist in the current context
- (35:12) Predefined type 'System.Object' is not defined or imported
- (35:12) The name 'EndContext' does not exist in the current context
- (36:12) Predefined type 'System.Object' is not defined or imported
- (36:12) The name 'BeginContext' does not exist in the current context
- (36:25) Predefined type 'System.Int32' is not defined or imported
- (36:29) Predefined type 'System.Int32' is not defined or imported
- (36:33) Predefined type 'System.Boolean' is not defined or imported
- (37:12) Predefined type 'System.Object' is not defined or imported
- (37:12) The name 'WriteLiteral' does not exist in the current context
- (37:25) Predefined type 'System.String' is not defined or imported
- (38:12) Predefined type 'System.Object' is not defined or imported
- (38:12) The name 'EndContext' does not exist in the current context
- (14:66) 'GeneratedTemplate.ExecuteAsync()': not all code paths return a value

See CompilationErrors for detailed information

  Source=RazorLight
  StackTrace:
   at RazorLight.Compilation.RoslynCompilationService.CompileAndEmit(GeneratedRazorTemplate razorTemplate)
   at RazorLight.TemplateFactoryProvider.CreateFactory(GeneratedRazorTemplate razorTemplate)
   at RazorLight.TemplateFactoryProvider.<CreateFactoryAsync>d__4.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at RazorLight.RazorLightEngine.<CompileTemplateAsync>d__10.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at RazorLight.RazorLightEngine.<CompileRenderAsync>d__9.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at FluentEmail.Razor.RazorRenderer.<ParseAsync>d__0`1.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at ConsoleApp1.Program.Main(String[] args) in D:\Projects\RazorEngineParser5\ConsoleApp1\Program.cs:line 12

Any ideas what is causing this?

ArgumentException: The UNC path should be of the form \\\\server\\share.

I'm running this example :

        public async void SendMail()
        {
            var email = Email
                        .From("[email protected]")
                        .To("my@mail", "ryan")
                        .Subject("Test from asp.net core webservice")
                        .Body("test 123")
                        ;
            await email.SendAsync();
        }

Then I'm getting : ArgumentException: The UNC path should be of the form \\server\share.
Any ideas?

"FluentEmail.Razor": "2.0.4",
"FluentEmail.Mailgun": "2.0.3"

Call back for Error, sent, etc..

hi,
is there a way to get the status of the send process? like if i am sending 1000 Emails, i want to know which one failed, sent, etc...

thanks in advanced.

FluentEmail with HangFire

Hi great package.

I have a problem when using Hangfire Background Processing package http://www.hangfire.io.

If I try to schedule an email for example

BackgroundJob.Schedule(() => FluentEmail.Email.From("[email protected]").To("[email protected]").Subject("Subject").Body("Body").Send()), TimeSpan.FromSeconds(30));

I get a System.InvalidOperationException: A from address must be specified.
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at FluentEmail.Email.Send()

but when I wrap it in a static class it works
ie

 public static void email(string FromEmail,string ToEmail,string Subject,string Body)
        {
             FluentEmail.Email.From(FromEmail).To(ToEmail).Subject(Subject).Body(Body).Send();
           

        }
 BackgroundJob.Schedule(() => EMS.App_Helpers.MyHelpers.email("[email protected]","[email protected]","Test","test"), TimeSpan.FromSeconds(30));   

Any Ideas?

Adding attachment

Hi,
awesome work,
but could you tell me please how can i attach files to the email that will be sent ?

Question: how do you handle attaching images consumed inside a razor view?

For images inside the razor template I used to create an attachment, get it's cid and set the cid as the image src. This is usually implemented as a method on the model itself so one can use it in razor like: <img src="@Model.EmbedImage("my-logo.png")" alt="my-logo" />

There are two issues though:

  1. the attachment itself needs to be added to the FluentEmail.Core.Email but the IFluentEmail is not accessible inside the model
  2. the attachment object is not a System.Net.Mail.Attachment but a custom class missing the needed Contentid property

I could probably solve the first issue with a base model class creating an empty IFluentEmail instance and building further fluent properties through this instance but have no idea how to come around the 2nd issue.

In case anyone wonders why attaching images at all - because not all email clients are kind enough to render images from an url.

Layout cannot be located

Given a view that specifies a layout:

@{
    Layout = "_Layout";
}

When I call:

UsingTemplateFromFile($@"{Directory.GetCurrentDirectory()}\EmailTemplates\Verify.cshtml", viewModel);

I get an error that the layout cannot be located. I also tried specifying the file path:

@{
    Layout = $@"{System.IO.Directory.GetCurrentDirectory()}\EmailTemplates\_Layout.cshtml";
}

Email template not rendering model data

This may be me missing something really obvious, but I am not able to replace the @model.Strings components in my email template properly. I am using the latest version of .NET Core on a new project.

Here is my controller code starting the email send off.

            Email.DefaultRenderer = new RazorRenderer();
            Email.DefaultSender = new SendGridSender("KEY");
            var email = Email
                .From("[email protected]", "Company")
                .To(model.Email)
                .Subject("You have been invited to join " + company.Name + "!")
                .UsingTemplateFromFile($"{Directory.GetCurrentDirectory()}/Views/Emails/StandardEmail.cshtml", new {
                    CallbackUrl = callbackUrl,
                    ButtonText = buttonText,
                    Footer = footer,
                    Body = body,
                    Header = header
                });
            await email.SendAsync();

Then my email file has several @Model.Footer and based on what is seen above. I am not using any other special code in the email file besides the HTML.

The email properly sends as expected, but I receive the email with the @Model.Footer text being shown, instead of the data being passed in the model above.

handler of exceptions

i think that Send and SendAsync methods should return status about sending like: sent/error

RazorRenderer doesn't work on netcoreapp2.0

Since I couldn't reactivate #63, opening a new issue.
I'm getting this error:

RazorLight.TemplateCompilationException occurred
HResult=0x80131500
Message=Failed to compile generated Razor template:

  • (3:29) The type or namespace name 'Razor' does not exist in the namespace 'RazorLight' (are you missing an assembly reference?)
  • (3:63) Predefined type 'System.String' is not defined or imported
  • (3:104) Predefined type 'System.Type' is not defined or imported

I'm using a .netcore app 2.0 and have installed FluentEmail v2.3.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.