mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
Rendered Email template in email Campaign
This commit is contained in:
committed by
Nabin Hait
parent
32936024a0
commit
88de00fb94
@@ -73,13 +73,13 @@ def send_mail(entry, email_campaign):
|
|||||||
|
|
||||||
email_template = frappe.get_doc("Email Template", entry.get("email_template"))
|
email_template = frappe.get_doc("Email Template", entry.get("email_template"))
|
||||||
sender = frappe.db.get_value("User", email_campaign.get("sender"), 'email')
|
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
|
# send mail and link communication to document
|
||||||
comm = make(
|
comm = make(
|
||||||
doctype = "Email Campaign",
|
doctype = "Email Campaign",
|
||||||
name = email_campaign.name,
|
name = email_campaign.name,
|
||||||
subject = email_template.get("subject"),
|
subject = email_template.get("subject"),
|
||||||
content = email_template.get("response"),
|
content = frappe.render_template(email_template.get("response"),context),
|
||||||
sender = sender,
|
sender = sender,
|
||||||
recipients = recipient,
|
recipients = recipient,
|
||||||
communication_medium = "Email",
|
communication_medium = "Email",
|
||||||
|
|||||||
Reference in New Issue
Block a user