jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Contact Form: invalid notification email address causes submission to fail silently

Open rachelmcr opened this issue 11 years ago • 3 comments

If an invalid email address is entered for the contact form's notification email, the form can be saved but fails silently on submission.

For example, entering the email address name@provider instead of [email protected] in the shortcode:

[contact-form to='name@provider'][/contact-form]

Will result in no one to send the email to:

https://github.com/Automattic/jetpack/blob/master/modules/contact-form/grunion-contact-form.php#L1234

That causes the form submission to completely fail without any error message.

Possible fixes:

  • Email validation when setting up the contact form rather than on form submission
  • Submitting and saving the form in the dashboard but not sending an email if the address is invalid
  • A clear error message about the failed submission (although not ideal, as the problem is with the form itself and this doesn't communicate the problem to the site owner)

rachelmcr avatar Feb 10 '15 13:02 rachelmcr

I want this fixed soon. We should never be silently losing submissions.

georgestephanis avatar Feb 10 '15 13:02 georgestephanis

@rachelmcr @georgestephanis What do you think about confirming the email address just as services usually do instead of just validating? Because I don't think validation solves the problem - I can enter a valid but nonexistent address and have all emails bounce on delivery.

zinigor avatar Feb 11 '15 14:02 zinigor

I don't mind nonexistent or incorrect emails being entered, because the submission will still go through and be captured in the dashboard (even if the email bounces). In that case, the site owner would have an opportunity to investigate why the emails aren't coming through without losing any submissions.

That said, I'm not entirely opposed to confirming the email address and I'll defer to the solution you think is best for resolving this.

rachelmcr avatar Feb 11 '15 15:02 rachelmcr