diff --git a/frappe/data/sample_site_config.json b/frappe/data/sample_site_config.json index 3c7c6e2c43..21f7f5910c 100644 --- a/frappe/data/sample_site_config.json +++ b/frappe/data/sample_site_config.json @@ -1,20 +1,20 @@ { - "db_name": "testdb", + "db_name": "testdb", "db_password": "password", "mute_emails": true, - + "developer_mode": 1, "auto_cache_clear": true, "disable_website_cache": true, "max_file_size": 1000000, - + "mail_server": "localhost", "mail_login": null, "mail_password": null, "mail_port": 25, "use_ssl": 0, "auto_email_id": "hello@example.com", - + "google_login": { "client_id": "google_client_id", "client_secret": "google_client_secret" @@ -27,8 +27,9 @@ "client_id": "facebook_client_id", "client_secret": "facebook_client_secret" }, - + "celery_broker": "redis://localhost", "celery_result_backend": null, - "scheduler_interval": 300 -} \ No newline at end of file + "scheduler_interval": 300, + "celery_queue_per_site": true +} diff --git a/frappe/utils/email_lib/email_body.py b/frappe/utils/email_lib/email_body.py index 1073283411..9951623da0 100644 --- a/frappe/utils/email_lib/email_body.py +++ b/frappe/utils/email_lib/email_body.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals import frappe from frappe import msgprint, throw, _ -from frappe.utils import scrub_urls +from frappe.utils import scrub_urls, get_url from frappe.utils.pdf import get_pdf import email.utils from markdown2 import markdown @@ -193,6 +193,9 @@ class EMail: if self.cc: self.msg_root['CC'] = ', '.join([r.strip() for r in self.cc]).encode("utf-8") + # add frappe site header + self.msg_root.add_header(b'X-Frappe-Site', get_url().encode('utf-8')) + def as_string(self): """validate, build message and convert to string""" self.validate()