Skip to content

Email Template not rendered when using HTML #1426

Description

@zaheer-srushty

Information about bug

Leave Approval Staus mail is being sent as an empty message via e-mail when the template is using HTML.

I believe this has to do with the following line

message = frappe.render_template(email_template.response, args)

The Email Template code has been refactored to user response_ as a property so that HTML templates or plaintext can be utilized. Relevant code is here

I think this should be changed to

message = email_template.get_formatted_response(args) 

or

message = frappe.render_template(email_template.response_, args) 

Module

HR

Version

Frappe Version - 15.9.0
ERPNext Version - 15.10.1
HRMS Version - 15.9.0

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions