This article has not yet been verified against Umbraco 8.

    The concepts and code examples might not work if you are running Umbraco 8.0 or a later version. If you are using Umbraco 7, this article is perfect for you!

    You are more than welcome to report any issues found on the Documentation Issue Tracker.

    Email Templates

    From version 6+ we now include a new Workflow 'Send email with template (Razor)' that allows you to pick a Razor view file that will then be used to send out a pretty HTML email for form submissions.

    We include an example email template for you to look at and understand how it works found at ~/Views/Partials/Forms/Emails/.

    Creating an email template

    If you wish to have one or more templates selectable from the 'Send email with template (Razor)' you will need to place all email templates into the folder ~/Views/Partials/Forms/Emails/.

    The Razor view must inherit from FormsHtmlModel:

    @inherits UmbracoViewPage<Umbraco.Forms.Core.Models.FormsHtmlModel>

    Then you have a model that contains your Form fields which can be used in your email HTML markup, along with the UmbracoHelper methods such as Umbraco.TypedContent and Umbraco.TypedMedia etc.

    Below is an example of an email template:

    @inherits UmbracoViewPage<Umbraco.Forms.Core.Models.FormsHtmlModel>
        // This is an example email template where you can use Razor Views to send HTML emails
        // You can use Umbraco.TypedContent & Umbraco.TypedMedia etc to use Images & content from your site
        // directly in your email templates too
        // Strongly Typed
        // @Model.GetValue("aliasFormField")
        // @foreach (var color in Model.GetValues("checkboxField")){}
    <h1>Explicitly Named Fields</h1>
    <h2>Favourite Colors</h2>
        @foreach (var color in Model.GetValues("favColors")) {
    <h1>Generic/reusable template</h1>
    @foreach (var field in Model.Fields)
        switch (field.FieldType)
            case "FieldType.FileUpload.cshtml":
                <a href="@siteDomain/@field.GetValue()">@field.GetValue()</a>
            case "FieldType.DatePicker.cshtml":
            case "FieldType.CheckboxList.cshtml":
                foreach (var color in field.GetValues())