How to: Use Flat Emails

Web Cube allows you to send transactional emails to your customers.  Operational emails can be used to communicate with customers in the following cases:

  • When a customer has completed a purchase
  • When an order has shipped
  • When a customer signs up for a newsletter
  • When a user wants to change their password
Transactional emails are essentially used to notify the customer that some change has occurred with their user account or an order they've placed.

Flat emails are a way to control the look and feel of transactional emails and let you make the most of how the emails work.

The anatomy of a Flat Email

A flat email has the following important parts:



It's best if you don't change the keys on the preloaded email. If you are adding a script that uses flatemails, feel free to choose whatever key you like.


This is the title of the email that you'll see in the flatemail list, it doubles as the subject line of the email that is sent to the customer.

From Email

This is the email address that is shown to the customer who received the email.


This is a template for the email.  You can use Django Template variables to substitute customer or order-specific information.  You can look at the preloaded flat emails for examples.


The sites upon which this template will be active

Template Name

The template for the background of the email.  This can be used to include things that should appear in all emails of this type.  This template usually will contain the header and footer, and for flatemails related to orders, some code to present the order details.

Alternative Content

Beneath the main content, there are Alternative Content objects.  These are used to store the HTML representation or other representations of the email.  When an email is sent, it is a multipart document.  That means that the plain text version and the HTML version can both be sent, and the email client (gmail, outlook, etc) can then decide which version of the content to present.  


If you want HTML content, you should set up an alternative content section with HTML or Markdown content.  The content type is the mime type that the email client will use to figure out what to present to your customer.  If this is confusing, just use "text/html," then add the content you need.

Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk