24 lines
694 B
Python
Raw Normal View History

# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
2013-09-10 13:46:15 +05:30
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
2014-10-21 16:16:30 +05:30
import frappe, json
from frappe import _
from frappe.utils import cint, formatdate
2013-09-11 18:58:20 +05:30
2014-02-14 15:47:51 +05:30
@frappe.whitelist(allow_guest=True)
2013-09-11 18:58:20 +05:30
def send_message(subject="Website Query", message="", sender="", status="Open"):
2014-02-14 15:47:51 +05:30
from frappe.templates.pages.contact import send_message as website_send_message
website_send_message(subject, message, sender)
comm = frappe.get_doc({
"doctype":"Communication",
"subject": subject,
"content": message,
"sender": sender,
"sent_or_received": "Received"
})
comm.insert(ignore_permissions=True)