Learn how to customize the reset password email template in Frappe framework to create a better user experience with branded, professional-looking password reset emails using the Email Template feature.
Frappe framework comes with a basic default reset password template that uses minimal styling. Here’s what the default template looks like:
<p>Please click on the following link to set your new password:</p>
<p><a class="btn btn-primary" href="{{link}}">Reset your password</a></p>
As you can see, it’s quite basic and uses minimal styling. For more information about Frappe’s email template system, check the official email template documentation.
Available Template Parameters
The reset password template in Frappe has access to only one variable:
{{link}}
– The password reset URL (the only available parameter)
Unlike other email templates in Frappe, the reset password template does not have access to user information like names or other variables. It only receives the reset link.
Creating a Custom Email Template
Instead of modifying core files, the recommended approach is to create a custom Email Template in Frappe:
Step 1: Navigate to Email Template
- Go to Awesome Bar (Top Right Search Bar) > Email Template List
- Click New to create a new Email Template
Step 2: Configure the Template
- Set the Name as “Password Reset”
- Set the Subject as “Reset Your Password”
- Add your custom HTML content in the Response field and enable
Use HTML
- Save the template
Step 3: Configure System Settings
To use your custom template:
- Go to Awesome Bar (Top Right Search Bar) > System Settings
- In the Email section, set the Password Reset Template to your custom template
- Save the settings
Enhanced HTML Template Example
Here’s a professional, responsive HTML template that’s much better than the default, using only the {{link}} parameter:
📧 Live Email Preview
Reset Your Password
Alternative: If the button above doesn’t work, copy and paste this link into your browser:
Testing Your Custom Template
To test your custom reset password template:
- Go to the login page of your Frappe site
- Click “Forgot Password?”
- Enter a valid email address
- Check the received email for your custom template
Key Features of the Enhanced Template
- Modern Typography: Uses Reddit Sans and Poppins fonts with various weights and styles
- Responsive Design: Works perfectly on desktop and mobile devices
- Professional Styling: Clean design with proper typography hierarchy
- Single Parameter: Uses only the {{link}} variable as supported by Frappe
- Accessibility: Proper contrast ratios and semantic HTML
- Fallback Link: Alternative text link if the button doesn’t work
Font Usage in the Template
The enhanced template uses a sophisticated font hierarchy:
- Reddit Sans: Main body text with weights 300-600 for readability
- Reddit Sans Condensed: Footer automated message with condensed styling
- Reddit Mono: Monospace font for URLs and code-like elements
- Poppins: Headings and emphasis text with weights 600-700
Template Limitations
It’s important to understand that the Frappe reset password template has specific limitations:
- Single Variable: Only
{{link}}
is available – no user names or other data - No Personalization: Cannot include user-specific greetings or custom messages
Best Practices
- Keep It Simple: Since only the link is dynamic, focus on clear messaging
- Font Loading: Use Google Fonts preconnect for better performance
- Typography Hierarchy: Different font families for different content types
- Brand Consistency: Customize colors while maintaining font consistency
- Clear Call-to-Action: Make the reset button prominent with Poppins font
- User Experience: Provide fallback options for users who can’t click the button
- Test Thoroughly: Test on different email clients and devices
Troubleshooting Common Issues
If your custom template isn’t working:
- Check System Settings: Ensure the correct template is selected in System Settings
- Verify Template Name: Make sure the template name matches exactly
- Clear Cache: Clear browser cache and Frappe cache
- Font Loading: Ensure Google Fonts are accessible in your environment
- Link Parameter: Verify you’re using
{{link}}
and not other variables - Email Client Testing: Test across different email clients (Gmail, Outlook, etc.)
Conclusion
Customizing the reset password email template in Frappe using the Email Template feature is straightforward even with the limitation of only having the {{link}}
parameter. The enhanced template example shows how to create modern typography with Reddit Sans and Poppins fonts, responsive design, and professional styling while working within Frappe’s constraints.
By using the Email Template approach instead of modifying core files, you ensure your customizations survive system updates and maintain the integrity of your Frappe installation.