2013-11-20 07:29:58 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
2013-09-10 08:16:15 +00:00
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
|
|
|
from __future__ import unicode_literals
|
2014-02-14 10:17:51 +00:00
|
|
|
import frappe
|
2013-09-11 13:28:20 +00:00
|
|
|
|
2014-02-14 10:17:51 +00:00
|
|
|
@frappe.whitelist(allow_guest=True)
|
2013-09-11 13:28:20 +00:00
|
|
|
def send_message(subject="Website Query", message="", sender="", status="Open"):
|
2014-02-14 10:17:51 +00:00
|
|
|
from frappe.templates.pages.contact import send_message as website_send_message
|
2014-04-18 10:45:31 +00:00
|
|
|
|
2014-09-15 11:29:38 +00:00
|
|
|
website_send_message(subject, message, sender)
|
2014-04-18 10:45:31 +00:00
|
|
|
|
2014-09-15 11:29:38 +00:00
|
|
|
comm = frappe.get_doc({
|
|
|
|
"doctype":"Communication",
|
|
|
|
"subject": subject,
|
|
|
|
"content": message,
|
|
|
|
"sender": sender,
|
|
|
|
"sent_or_received": "Received"
|
|
|
|
})
|
|
|
|
comm.insert(ignore_permissions=True)
|