Rendered Email template in email Campaign

This commit is contained in:
FinByz Tech Pvt. Ltd 2019-10-17 17:12:23 +05:30 committed by Nabin Hait
parent 32936024a0
commit 88de00fb94

View File

@ -73,13 +73,13 @@ def send_mail(entry, email_campaign):
email_template = frappe.get_doc("Email Template", entry.get("email_template"))
sender = frappe.db.get_value("User", email_campaign.get("sender"), 'email')
context = { "doc":frappe.get_doc(email_campaign.email_campaign_for,email_campaign.recipient) }
# send mail and link communication to document
comm = make(
doctype = "Email Campaign",
name = email_campaign.name,
subject = email_template.get("subject"),
content = email_template.get("response"),
content = frappe.render_template(email_template.get("response"),context),
sender = sender,
recipients = recipient,
communication_medium = "Email",