diff --git a/frappe/email/email_body.py b/frappe/email/email_body.py index e36cd2e651..1190a6f00b 100755 --- a/frappe/email/email_body.py +++ b/frappe/email/email_body.py @@ -291,9 +291,11 @@ def inline_style_in_html(html): ''' Convert email.css and html to inline-styled html ''' from premailer import Premailer + from frappe.utils.jinja_globals import bundled_asset # get email css files from hooks css_files = frappe.get_hooks('email_css') + css_files = [bundled_asset(path) for path in css_files] css_files = [path.lstrip('/') for path in css_files] css_files = [css_file for css_file in css_files if os.path.exists(os.path.abspath(css_file))] diff --git a/frappe/hooks.py b/frappe/hooks.py index 3215f23e04..6fff9ac2a1 100644 --- a/frappe/hooks.py +++ b/frappe/hooks.py @@ -52,7 +52,7 @@ web_include_js = [ web_include_css = [] -email_css = ['/assets/frappe/dist/css/email.bundle.css'] +email_css = ['email.bundle.css'] website_route_rules = [ {"from_route": "/blog/", "to_route": "Blog Post"},