Configure Email Templates
Configure Email Templates
Customize email templates for automated notifications, communications, and system messages.
Time required: 10-15 minutes per template
Module: mail, openeducat_core_enterprise
User role: System Administrator
Prerequisites
- System Administrator role
- Email server configured
- Understanding of template placeholders
Steps
Step 1: Access Email Templates
- Go to Settings -> Technical -> Email -> Templates
- Or search for “Email Templates” in the menu
Step 2: Find Existing Templates
OpenEduCat includes default templates:
| Template | Purpose | Model |
|---|---|---|
| Admission Confirmation | Admission submitted | op.admission |
| Admission Approved | Application accepted | op.admission |
| Fee Reminder | Payment due notice | op.student.fees |
| Exam Schedule | Exam notification | op.exam |
| Result Published | Grade notification | op.result |
Step 3: Edit Template Content
- Open a template
- Modify the Body section
| Section | Description |
|---|---|
| Subject | Email subject line |
| Body | Main content (HTML) |
| From | Sender address |
| Reply-To | Reply address |
Step 4: Use Dynamic Placeholders
Insert dynamic content using placeholders:
| Placeholder | Description | Example Output |
|---|---|---|
${object.name} | Student name | ”John Smith” |
${object.email} | Student email | ”john@email.com” |
${object.course_id.name} | Course name | ”B.Sc Computer Science” |
${user.name} | Current user | ”Admin User” |
${ctx.get('key')} | Context value | Variable |
Step 5: Format Template Body
Example template structure:
<p>Dear ${object.name},</p>
<p>Your admission application for<strong>${object.course_id.name}</strong>has been received.</p>
<p>Application Number: ${object.application_number}</p>
<p>Best regards,<br/>Admissions Office</p>Step 6: Add Attachments
In Attachments section:
- Add static files (brochures, documents)
- Or configure dynamic report attachments
Step 7: Preview Template
- Click Preview button
- Select a sample record
- Review rendered output
Step 8: Save Template
Click Save to update the template.
Creating New Templates
- Click Create in template list
- Fill required fields:
| Field | Description |
|---|---|
| Name | Template identifier |
| Model | Target model (op.student, etc.) |
| Subject | Email subject |
| Body | HTML content |
Common Placeholders by Model
Student (op.student)
| Placeholder | Description |
|---|---|
${object.name} | Student name |
${object.student_id} | Student ID |
${object.course_id.name} | Course |
${object.batch_id.name} | Batch |
Admission (op.admission)
| Placeholder | Description |
|---|---|
${object.name} | Applicant name |
${object.application_number} | Application number |
${object.state} | Application status |
Field Reference
Email Template
| Technical Field | UI Label | Type | Notes |
|---|---|---|---|
name | Name | Char | Template identifier |
model_id | Model | Many2one | Target model |
subject | Subject | Char | Email subject |
body_html | Body | Html | Email content |
email_from | From | Char | Sender address |
Troubleshooting
Placeholders not rendering
- Check placeholder syntax is correct
- Verify field exists on the model
- Check object has data in that field
Template not sending
- Verify email server is configured
- Check template is linked to correct action
- Review email queue for errors
Formatting issues
Use inline CSS styles for reliable rendering across email clients.
Related: Configure Email | Set Up Email Notifications