Create an email template in .NET

Download the code example to create email templates in your ASP.NET Core app.

You can learn about the best way to create an email template in .NET, or watch the video.

Download the code example

You'll need to fill out the code example form. We will send you an email where you can download the code example.

Software

This is the software that will need to be installed onto your machine.

The application

Open up RoundTheCode.SendEmail.slnx, and run the application. The email template will load at https://localhost:7247/send-email.

You can also open https://localhost:7247/send-email/new-order to see another example of an email template.

The email content is generated from the views located in Views/Email in the Web application. It's generated as a HTML string using EmailHelper > GetEmailContentAsync, located in the Application project.