mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
Merge branch 'finbyz-develop' into develop
This commit is contained in:
@@ -52,7 +52,8 @@
|
|||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Email Campaign For ",
|
"label": "Email Campaign For ",
|
||||||
"options": "\nLead\nContact"
|
"options": "\nLead\nContact",
|
||||||
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "recipient",
|
"fieldname": "recipient",
|
||||||
@@ -69,7 +70,7 @@
|
|||||||
"options": "User"
|
"options": "User"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2019-07-12 13:47:37.261213",
|
"modified": "2019-11-11 17:18:47.342839",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "CRM",
|
"module": "CRM",
|
||||||
"name": "Email Campaign",
|
"name": "Email Campaign",
|
||||||
|
|||||||
@@ -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