Sitewide Contact Form Missing Required Email Address

ebeyrent - January 29, 2008 - 15:00
Project:Drupal
Version:5.6
Component:contact.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

We have a sitewide contact form (http://greenopolis.com/beta/contact), which requires a user to enter his or her name, email address, etc. When the form is submitted and the email message is generated, the user's email address is not included in the message that gets constructed in the contact_mail_page_submit($form_id, $form_values) function.

There is a record in watchdog.

I'd like to see something like this:

sent a message using the contact form at !form.", array('!name' => $form_values['name'], '!form' => url($_GET['q'], NULL, NULL, TRUE), '!email' => $form_values['mail']));
$message[] = $form_values['message'];
?>

Is this just an oversight, or is there a reason why the email address is not currently being passed in the body of the message?

AttachmentSize
contact.01292008.patch1.17 KB

#1

ebeyrent - January 29, 2008 - 16:51

The reason why this is happening on my site is because I am using the SMTP module, which is overwriting the From field.

However, I contend that at the very least, the contact_mail_page_submit() function should set the Reply-to header to $form_values['mail'].

 
 

Drupal is a registered trademark of Dries Buytaert.