Notifications
Alert email templates
Edit the subject and wording of every alert email, add details with placeholders, set the header colour, and preview or send a test before you save.
What it does
The Template Studio lists every alert on the left. Pick one to edit its subject, its recipients and its email text in a simple editor.
Placeholders in curly brackets, such as {site_name} or {current_date}, are replaced with real details when the email is sent. Each alert also has its own, such as the address that was locked out.
The Base template sets the header colour shared by every alert email.
Why it matters
Clear alerts get acted on. You can write them in your own words, add instructions for your team, or make client-facing alerts match your brand.
Set it up
- Go to the Notifications tab, section Templates.
- Pick an alert, edit the Subject and the email content. Insert placeholders from the list under the editor.
- Click Preview to see it in light or dark, at desktop or phone width, or as plain text, or Send Test to receive it.
- Click Save Template. Reset brings back the original text.
Good to know
Send Test sends the saved template, so save first to test your latest changes.
The emails people get when they sign in (two-factor codes and links, unlock links, password change requests) are listed under Base template. Their wording is fixed; Preview shows them and Send Test sends a sample to you, with a code and links that cannot sign anyone in.
Every email Stack Guard sends, from alerts to sign-in codes, links and password reminders, uses the same layout with the Stack Guard logo, a plain-text version for mail apps that do not show designs, and a dark version for mail apps in dark mode.
Emails are sent in the site name, for example "Harbor Dental", instead of the WordPress default, "WordPress". An email delivery plugin or host that sets its own sender name keeps it.
The header is dark by default. With a light header colour, emails switch to the logo with dark lettering. A white label logo is shown as uploaded, so check that it reads well on the colour you pick.
Emails to people signing in (codes, links, password requests) use the language they chose on their profile, when it differs from the site language and a translation of Stack Guard is installed. Alerts to the alert recipients use the site language. On an English site with English users nothing changes.
Alerts that need a reaction carry a small label: Needs attention or Worth a look. Each alert has a button to the screen where it can be dealt with.
On Agency plans with White Label filled in, your plugin name, company name, website and company logo replace Stack Guard in every email. Use a PNG or JPG logo: mail apps such as Gmail and Outlook do not show SVG, so an SVG logo is replaced by your name in text.
A custom sender name and address is on the roadmap.
Which plan includes it
Template editing is part of Pro.
How it works, for developers
- Templates are stored in the option
smg_notification_templates; the header colour insmg_email_header_color. - Shared placeholders:
{site_name},{site_url},{current_date},{current_time},{admin_email},{dashboard_link},{settings_url},{year},{logo_url}. - Emails are sent with
wp_mail(), so any email delivery plugin on the site is used. - The layout lives in
SMG_Email(includes/class-smg-email.php):render()builds the HTML and plain-text parts,send()sends both. Alerts reach it throughSMG_Notifications, which keeps quiet hours, the hourly cap and batching. The logo isassets/images/brand/stack-guard-logo-email.png, loaded from the site itself. The header colour defaults to#111827on new installs because the logo has white lettering.
Quick answers about alert email templates
What does Alert email templates do in Stack Guard?
The Template Studio lists every alert on the left. Pick one to edit its subject, its recipients and its email text in a simple editor. Placeholders in curly brackets, such as {site_name} or {current_date}, are replaced with real details when the email is sent. Each alert also has its own, such as the address that was locked out. The Base template sets the header colour shared by every alert email.
Why use alert email templates on a WordPress site?
Clear alerts get acted on. You can write them in your own words, add instructions for your team, or make client-facing alerts match your brand.
How do I set up alert email templates?
1. Go to the Notifications tab, section Templates. 2. Pick an alert, edit the Subject and the email content. Insert placeholders from the list under the editor. 3. Click Preview to see it in light or dark, at desktop or phone width, or as plain text, or Send Test to receive it. 4. Click Save Template. Reset brings back the original text.
Which Stack Guard plan includes alert email templates?
Template editing is part of Pro.
More in Notifications
- Email alertsEmails you when something important happens: a lockout, a new administrator, malware, changed files, updates waiting and more. You pick which alerts, who gets them and how fast.
- Quiet hours, limits and digestsKeeps alerts useful instead of overwhelming: hold them overnight, cap how many arrive, and get one summary email a day or a week.
Not running Stack Guard yet? It is free.
Download Free