If clients send an inquery through contact us page, system will automatically reply an email. The content is like:
Thank you for reaching out to us. We will get back to you at the earliest.
Your query:
xxxxxxxxxxx
Sent via ERPNext
How to change the content?
NCP
March 17, 2024, 5:33am
2
Hi @zhu_ziqiang ,
You can’t change from the front side. It’s defined in the core.
Please check it.
@rate_limit(limit=1000, seconds=60 * 60)
def send_message(sender, message, subject="Website Query"):
sender = validate_email_address(sender, throw=True)
with suppress(frappe.OutgoingEmailError):
if forward_to_email := frappe.db.get_single_value("Contact Us Settings", "forward_to_email"):
frappe.sendmail(recipients=forward_to_email, reply_to=sender, content=message, subject=subject)
frappe.sendmail(
recipients=sender,
content=f"<div style='white-space: pre-wrap'>Thank you for reaching out to us. We will get back to you at the earliest.\n\n\nYour query:\n\n{message}</div>",
subject="We've received your query!",
)
# for clearing outgoing email error message
frappe.clear_last_message()
# add to to-do ?
frappe.get_doc(
dict(
doctype="Communication",
Thank You!
1 Like
ankush
March 17, 2024, 6:10am
3
Web forms are better for customisation.
Webform + notification (for replying on creation of query) seems like best approach here.
2 Likes
@ankush Hi, I think webform + notification are better here, but I’m not familiar with web forms customisation. I have tried docs , but failed.
Could you please give more specific implementation details?