Hi there,

We're just in the final throws of testing our new website before making it live and we have discovered what we think is a bug with this module.

We have two contact forms on the site, one on the home page (using contact form block) and one on the main contact page.

If you enter an invalid email address into the main contact form you get an error message that says 'You must enter a valid e-mail address', which is the correct behaviour.

If you enter an invalid email address into the contact form block on the home page, you get a 'Your message has been sent.' message. However, the following PHP warning is also triggered:

* warning: mail() [function.mail]: SMTP server response: 501 unacceptable mail address in Z:\indulge\Website\v2\htdocs\drupal-6.13\includes\mail.inc on line 193.
* Unable to send e-mail. Please contact the site administrator if the problem persists.

It looks like the email address is not being validated before being submitted to the PHP mail function.

I have tried using a different category for the home page contact form block, however this has not resolved the issue.

In terms of form modifications, I have tweaked a few of the fields by registering a theme function for the form, however the issue still exists with this theme function disabled.

Any help / suggestions would be much appreciated.

Regards,

Pat

CommentFileSizeAuthor
Picture 3.png26.79 KBpatthewebrat
Picture 2.png10.39 KBpatthewebrat

Comments

fuerst’s picture

Status: Active » Fixed

Thanks for reporting that issue. It is fixed in 6.x-1.1 and 5.x-1.2.

patthewebrat’s picture

That's awesome. Thanks for replying to quickly. This is why I love Drupal!

Pat

fuerst’s picture

Status: Fixed » Closed (fixed)

Me too :)

BTW: The email validation in Drupal 6 doesn't work 100%. You may read about why here: #265548: valid_email_address() is not RFC compliant