← Back to plugins Message

Kopere Email

This plugin was developed to allow full customization of emails sent by Moodle, while maintaining a base template that standardizes the visual identity.

Frankenstyle message_kopereemail
Category Message
Reported sites 109 sites
Screenshot of Kopere Email

About Kopere Email

Goal
Stop sending "ugly default Moodle emails" and gain a clean, branded, customizable email system.

Kopere Email

message_kopereemail is a Moodle message output based on message_email, built to deliver consistent, branded emails - while still letting you create fully custom HTML per notification type.

Email preview showing wrapper applied to a custom provider message

What the plugin solves (in practice)

Moodle can send many different notifications, from many plugin. This plugin adds the missing layer: control, consistency, and customization without core changes or theme hacks.

Standardize identity
Apply a single wrapper to deliver consistent layout, spacing, branding, and links.
Custom messages per provider
Create "nice" tailored messages for key events (course completed, reminders, warnings).
Subject + body control
Override subject and HTML content in one place, centralized in admin.
Better inbox behavior
Digest mode for group conversations reduces spam and improves the experience.
Best part
Moodle keeps sending notifications as usual - the plugin intercepts delivery and applies your rules.

How it works

The plugin adds a customization layer on top of Moodle’s existing messaging flow. It decides what to send based on provider and available HTML, then standardizes the final output with the wrapper.

Rule of thumb
  • If fullmessagehtml exists → apply wrapper.
  • If it doesn’t → create simple HTML from text, then apply wrapper (if configured).
Automatic configuration migration (on install)
To prevent students from receiving duplicate emails, the plugin can migrate settings to "take the place" of default email output.
  • Copies existing config from message/email into message_kopereemail.
  • Rewrites provider enabled flags from emailkopereemail.
  • Locks providers (*_locked = 1) to keep consistency.
  • Disables old email processor in mdl_message_processors.
Import / Export settings
Move wrapper + per-provider templates between environments (staging → production) or across sites.
  • Exports global wrapper.
  • Exports custom messages per provider (component + name).
  • Does not overwrite Moodle operational preferences like enabled/locked flags.

Available placeholders

Templates use Mustache-style placeholders. Use triple braces when inserting HTML.

Common
  • {{subject}}
  • {{fullmessage}}
  • {{{fullmessagehtml}}}
  • {{dates.now}}
Site
  • {{site.fullname}}
  • {{site.shortname}}
  • {{site.url}}
  • {{site.logourl}} / {{site.compact_logourl}}
Users to
  • {{userto.id}}
  • {{userto.profileurl}}
  • {{userto.fullname}}
  • {{userto.firstname}} / {{userto.lastname}}
  • {{userto.email}}
Users from
  • {{userfrom.id}}
  • {{userfrom.profileurl}}
  • {{userfrom.fullname}}
  • {{userfrom.firstname}} / {{userfrom.lastname}}
  • {{userfrom.email}}
Course (when detectable)
  • {{course.id}}
  • {{course.fullname}}
  • {{course.shortname}}
  • {{course.url}}
Suggested expansion (roadmap ideas)
If you want to expand the placeholder library, these are high-value additions that keep templates simple:
  • Course completion details: completion date, grade, certificate URL, time spent.
  • Course metadata: category name, start/end date, visibility, custom fields.
  • Recipient convenience: preferred language, timezone, profile fields (safe subset).
  • Sender context: role name in course, department/campus (if available).
  • Utility formatting: preformatted dates, safe links, "short excerpt" from long messages.
  • CTA links: "Go to course", "Open activity", "Message preferences" URLs as ready-to-use placeholders.
Template tip
Insert HTML with {{{variable}}} (triple braces). Using only {{variable}} may escape HTML and print tags as text.

Screenshots

Real UI views: wrapper editor, provider custom templates, and results.
Back to top
Custom message editor with subject, HTML editor, and available placeholders
Custom message per provider
Edit subject + HTML and use placeholders to generate a tailored message for that provider.
Wrapper template editor showing subject and fullmessagehtml placeholders
Wrapper template (base layout)
Define a global wrapper and inject the provider HTML via {{{fullmessagehtml}}}.
Admin list of providers with actions to create/edit/delete custom messages and export/import JSON
Providers table + Import/Export
Centralize management: create/edit/delete templates and migrate settings via JSON.
Email preview showing custom content rendered inside the wrapper
Final email result
The student receives a clean, branded email instead of Moodle’s default layout.
Testing workflow
Create/edit a template → save → use template preview/test email → adjust until perfect.

Support

For questions, bugs, improvements, or suggestions, open an issue with: Moodle version, steps to reproduce, affected provider (component + name), and template example (without sensitive data). If it’s about digest, include cron/task logs.

Best practices
  • Start with the wrapper: set the global identity first.
  • Customize only the providers that matter.
  • Keep templates objective and scannable.
  • Validate HTML structure (close tags properly).
  • Always test after saving.
Why this approach works
  • No core modifications.
  • No theme hacks.
  • Centralized admin management.
  • Consistent branding across all emails.
  • Optional per-provider perfection.
Related

Other Moodle plugins

Screenshot of Degrade Theme
Degrade Theme theme_degrade

The Degrade theme offers a series of pre-programmed colors for you to choose the best one and has amazing support for Dark Mode.

1982 sites Details →
Screenshot of Kopere Dashboard
Kopere Dashboard local_kopere_dashboard

Kopere Dashboard is a tool panel with reports, online users, backup, notifications and more.

2546 sites Details →
Screenshot of Mod Super Video
Mod Super Video mod_supervideo

The Super Video Module and Kapture enhance the teaching experience on Moodle by providing optimized video viewing and efficient video lecture production, enriching the learning environment for both teachers and students.

1794 sites Details →