For the complete documentation index, see llms.txt. This page is also available as Markdown.

Email Templates

Creating an email template for Umbraco Forms.

Forms include Send email with template (Razor) Workflow. This allows you to pick a Razor view file that can be used to send out a pretty HTML email for Form submissions.

Creating an Email Template

To use custom templates with the Send email with template (Razor) workflow, place your files in the ~/Views/Partials/Forms/Emails/ folder. They will then appear as options in the dropdown menu.

The Razor view must inherit from FormsHtmlModel:

@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Forms.Core.Models.FormsHtmlModel>

You now have a model with your Form fields. This can be used in your email HTML markup, along with the UmbracoHelper methods like Umbraco.TypedContent and Umbraco.TypedMedia, and so on.

Below is an example of an email template based on Example-Template.cshtml shipped with Umbraco Forms. Use this as a base for creating your own template.

Last updated

Was this helpful?