Website contact form to Email address

Hello All,

I created an issue in Github but thought the community might have some ideas as well. When a website visitor submits the contact form, an entry is added under communication, but no email is sent to the “Forward To Email Address” (Contact Us Settings).

In prior releases, the python function below was found in

# send email
	forward_to_email = frappe.db.get_value("Contact Us Settings", None, "forward_to_email")
	if forward_to_email:
		frappe.sendmail(recipients=forward_to_email, sender=sender, content=message, subject=subject)

This function was removed as its had issues of its own. Though the frappe.sendmail would go through, it would attempt to send the email from the email address which the visitor entered in the website form. The email would fail in the que as there is no email server settings that can send from the visitors email address.

I love how it files the form entry away. I am simply afraid that I am going to to miss someone’s message :slight_smile:.

1 Like

I simply change sender to reply_to, hope can temporary solve the problem.

frappe.sendmail(recipients=forward_to_email, reply_to=sender, content=message, subject=subject, now=True)