Skip to content

Customize Mails

iJungleboy edited this page Jan 17, 2017 · 2 revisions

Overview to Customizing Mails

Check out the razor files in the email-templates folder, and you'll see that these contain a section which generates the body, and a function which generates the subject. You can:

  1. Customize these files as you need them
  2. Create new copies of these files, in case you want different mails for different uses

The default setup already does

  1. sends to the site owner and the customer...
  2. using fully templated e-mails based on Razor templates
  3. both subject and body are templateable
  4. you can set a different Reply-To address
  5. you can also CC both the customer and owner mail to more people

Create/Use Additional E-Mail Templates

Just copy the files you want in the email-templates folder. To make your form use it, you can:

  • either go to the specific form, and in the edit-dialog, type in the name of the template to be used
  • go to the App-Settings and change the default template file for owner and/or customer

Customize the E-Mail Subject

The basic implementation is simple: the subject is taken from the form configuration or if missing, uses a default subject configured in the app settings. You can change this to anything you want, using simple C# string function like String.Replace or String.Format

Customize the E-Mail Body/Message

The basic implementation just sends a mail with all fields to the owner, and a simple thank-you message to the customer. Just customize this as you need it.