[mailbox] removed separate email settings for jobs, sales, support
diff --git a/erpnext/templates/utils.py b/erpnext/templates/utils.py
index d3c93eb..9892924 100644
--- a/erpnext/templates/utils.py
+++ b/erpnext/templates/utils.py
@@ -7,19 +7,14 @@
@frappe.whitelist(allow_guest=True)
def send_message(subject="Website Query", message="", sender="", status="Open"):
from frappe.templates.pages.contact import send_message as website_send_message
- res = website_send_message(subject, message, sender)
- if not res:
- return
+ website_send_message(subject, message, sender)
- if subject=="Support":
- # create support ticket
- from erpnext.support.doctype.support_ticket.get_support_mails import add_support_communication
- add_support_communication(subject, message, sender, mail=None)
- else:
- # make lead / communication
- from erpnext.selling.doctype.lead.get_leads import add_sales_communication
- add_sales_communication(subject or "Website Query", message, sender, sender,
- mail=None, status=status)
-
- return res
+ comm = frappe.get_doc({
+ "doctype":"Communication",
+ "subject": subject,
+ "content": message,
+ "sender": sender,
+ "sent_or_received": "Received"
+ })
+ comm.insert(ignore_permissions=True)