how to use erpnext.send_message from another web site how to send the URL of my wrpnext web host ?
You can send a POST request using the REST API to:
/api/method/frappe.templates.pages.contact.send_message
with the appropriate parameters:
https://github.com/frappe/frappe/blob/develop/frappe/templates/pages/contact.py#L31
i have tied it but i faced the issue of cross domain specially i’m using javascript to do the post, any workaround ??
https://enwtrail2.frappecloud.com/api/method/frappe.templates.pages.contact.send_message. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://fiddle.jshell.net’ is therefore not allowed access.
You will have to find a better way to send the request, maybe relay it via your website. What platform are you using for that?