fix(Contact form): make email translatable
This commit is contained in:
parent
c907636c3e
commit
bcdce09dba
1 changed files with 5 additions and 2 deletions
|
|
@ -34,10 +34,13 @@ def send_message(sender, message, subject="Website Query"):
|
|||
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)
|
||||
|
||||
reply = _(
|
||||
"Thank you for reaching out to us. We will get back to you at the earliest.\n\n\nYour query:\n\n{0}"
|
||||
).format(message)
|
||||
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!",
|
||||
content=f"<div style='white-space: pre-wrap'>{reply}</div>",
|
||||
subject=_("We've received your query!"),
|
||||
)
|
||||
|
||||
# for clearing outgoing email error message
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue