fix: Select appropriate email template response (#13051)

* Update email_group.py

Fix: Select appropriate email template response, Welcome email template can be either html or rich text

* refactor: Simpify code

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
This commit is contained in:
getsali 2021-05-31 16:32:58 +05:30 committed by GitHub
parent 872299b3f3
commit 0afe774ddb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,6 +105,6 @@ def send_welcome_email(welcome_email, email, email_group):
email=email,
email_group=email_group
)
message = frappe.render_template(welcome_email.response, args)
email_message = welcome_email.response or welcome_email.response_html
message = frappe.render_template(email_message, args)
frappe.sendmail(email, subject=welcome_email.subject, message=message)