Inkcite 1.18.3

Failsafe Rules

Inkcite’s Failsafes ensure your email includes everything you want and nothing you don’t. Out of the box, Inkcite automatically warns you if your current project meets any of these conditions:

  • Uses the Lorem Ipsum helper
  • Has placeholder or Images that are missing dimensions
  • Has links that are missing

Inkcite also supports custom Failsafes. These allow you to verify that your email either includes or excludes specific content.

For example, let’s say your company’s authorized resellers were formerly called “dealers”, but now must always be referred to as “retailers” instead. Additionally, every email you create must include a link allowing the recipient to find a local retailer. These are the sort of requirements that Failsafes were made for.

# Make sure no one uses the word 'dealer' in their email content.
# And ensure every email includes a link to the company's retailer
# search page.
failsafes:
  excludes:
    - "dealer"
  includes:
    - '<a href="http://company.com/find-a-retailer/">'

When a Failsafe is triggered, Inkcite will warn you in its command line output:

$ inkcite build
The prospects version (email) has 1 errors:
- Failsafe! Email must not include "dealer" (line 362)

You can specify as many Failsafes as necessary, and they can be defined globally and/or by environment.

# Make sure production emails always include an 
# unsubscribe link and a Litmus analytics tracking
# code.
production:
  failsafes:
    includes:
      - Unsubscribe
      - '<a href="http://company.com/unsubscribe.asp">'
      - /https://[^\\.]+.emltrk.com/

Advanced Feature You can use regular expressions for explicit matching control. Start and end your regex Failsafe with /.

Viewing your email locally and sending preview versions still work when Inkcite detects problems in your email, but you can’t build the production assets unless you force Inkcite to do it (not recommended).

inkcite build --force