Create email using ASP.NET MVC views

HTML and plain-text emails

You want to send an email that includes both rich HTML and plain text versions? Postal makes it easy.

Step 1

Create the main view. This will have the headers and reference the views to use.


Subject: Fancy email
Views: Text, Html

Step 2

Create the text view. Note the naming convention: Example.cshtmlExample.Text.cshtml


Content-Type: text/plain; charset=utf-8

Hello @ViewBag.PersonName,
This is a message

You must specify a single Content-Type header.

Step 3

Create the HTML view, also with a single Content-Type header.


Content-Type: text/html; charset=utf-8

    <p>Hello @ViewBag.PersonName,</p>
    <p>This is a message</p>