|
/ Documentation /Custom Code Snippets/ Customizing Email Templates in SureDash and SureDash Pro

Customizing Email Templates in SureDash and SureDash Pro

Every email SureDash sends is a small but meaningful touchpoint with your community. By customizing the email templates, you can make sure those emails reflect your brand’s colors, logo, and tone, rather than using the default plugin styling.

This guide walks theme developers and site owners through how to override the email wrapper to rebrand all emails at once, and for SureDash Pro users, how to also customize the content of specific email types.

Applies to: SureDash 1.8.1+ and SureDash Pro (released after 1.7.0) All file paths in this guide are relative to your active theme’s directory.

How Email Templating Works

Every SureDash email is built in two layers:

Wrapper Controls the overall HTML structure, including the DOCTYPE, layout, header, and footer.

Inner Template Controls the actual email content, such as the message, greeting, and call-to-action button.

Here is how the two layers work together when an email is sent:

  1. The inner content is generated first.
  2. It is passed into the wrapper as the variable $email_body_content.
  3. The wrapper controls how that content is displayed.

This means you can rebrand all emails at once by updating just the wrapper, or override only the specific templates you want to change.

What You Can Customize

WhatFile to OverrideAvailable In
Visual shell for all emailswrapper.phpFree + Pro
Content for specific emailspost-reply.php, comment-reply.php, mention.phpPro only
Sender name and email addressSettings UI (no code needed)Free + Pro

Quick Start: Rebrand All Emails

Step 1: Create the override folder

Inside your active theme, create this folder:

your-theme/suredash/email-templates/

Step 2: Copy the wrapper file

Copy the following file into the folder you just created:

wp-content/plugins/suredash/email-templates/wrapper.php

Step 3: Edit your copy

Open your copied wrapper.php and make your design changes, such as updating colors, the layout, or your logo.

Important: Never edit plugin files directly. Plugin updates will overwrite any changes you make there.

Wrapper Template Reference

File locations

LocationPath
Theme override (recommended)your-theme/suredash/email-templates/wrapper.php
Plugin defaultwp-content/plugins/suredash/email-templates/wrapper.php

Available variable

VariableDescription
$email_body_contentContains the full HTML of the email’s inner content

To output the email content, use:

php

echo $email_body_content;

Email styling guidelines

Keep these best practices in mind when editing the wrapper:

  • Use inline CSS only
  • Use table-based layouts for structure
  • Set a fixed width (600px is standard)
  • Avoid background images
  • Keep total email size under 100 KB

Examples

Add a header logo

Insert this above your content block, replacing the URL with your logo’s actual address:

html

<img src="https://example.com/logo.png" width="160" alt="Your Logo">

Change colors

Update the hex values in your inline styles to match your brand. You can change background color, text color, and border colors.

Add a footer

Add a footer below the content block. A common choice is a “Manage email preferences” link to give subscribers control over the emails they receive.

Per-Email Content Overrides (Pro)

SureDash Pro allows you to override the content of specific email types. The available templates are:

  • post-reply.php
  • comment-reply.php
  • mention.php

Override path

Place your customized templates here:

your-theme/suredash/email-templates/<template-name>.php

Important: Your override files should contain only the email content, not a full HTML document. The wrapper is applied automatically. Do not include <html> or <body> tags.

Inner Template Variables (Pro)

Each template has access to a set of variables you can use to personalize the email content.

post-reply.php

VariableDescription
$recipient_nameThe person receiving the email
$author_nameThe person who wrote the reply
$post_titleThe title of the post
$post_urlLink to the post
$reply_excerptA short excerpt of the reply
$portal_nameThe name of the portal

comment-reply.php

VariableDescription
$recipient_nameThe person receiving the email
$author_nameThe person who wrote the reply
$comment_excerptA short excerpt of the original comment
$reply_excerptA short excerpt of the reply
$post_urlLink to the post
$portal_nameThe name of the portal

mention.php

VariableDescription
$recipient_nameThe person who was mentioned
$author_nameThe person who mentioned them
$contextThe context in which the mention occurred
$content_excerptA short excerpt of the content
$post_urlLink to the post
$portal_nameThe name of the portal

From Name and From Email

You can update the sender name and email address directly from the WordPress admin panel. No code changes are needed.

Go to: WP Admin > SureDash > Settings > Emails

  • Portal Name sets the sender name.
  • From Email sets the sender’s email address.

Special characters in the sender name are supported automatically.

Troubleshooting

Override not working

Check the following:

  • The file path matches exactly: your-theme/suredash/email-templates/
  • Your theme is active
  • Your caching plugin (if any) has been cleared
  • The file permissions allow the server to read the file

Emails showing raw HTML

  • Update SureDash to the latest version
  • Make sure your wrapper includes the full expected HTML structure
  • Check the raw source of a test email to identify where the output breaks

Images not showing

  • Use absolute URLs (not relative paths)
  • Avoid using background images in CSS
  • Make sure your images are hosted somewhere publicly accessible

Outlook display issues

  • Use tables for all layout and structure
  • Avoid modern CSS properties like flexbox or grid
  • Stick to web-safe fonts for the best cross-client compatibility

Conclusion

Customizing your SureDash email templates is a straightforward way to make every notification feel like a natural part of your brand. Whether you update just the wrapper for a quick visual refresh or go deeper with Pro-level content overrides, even small changes can make a big difference in how your community experiences your portal.

Need more help? Explore the rest of our SureDash Documentation or reach out to our support team anytime.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

On this page
Scroll to Top