mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-02 16:13:22 +00:00
[mailbox] removed separate email settings for jobs, sales, support
This commit is contained in:
@@ -7,19 +7,14 @@ import frappe
|
||||
@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)
|
||||
|
||||
Reference in New Issue
Block a user