Hi,
When you create a contact form, it may be useful to redirect the mail to a mailing list. But often, mailing lists only accept mail coming from registered or well-known users. But the drupal contact form is always sent using the provided email address which can virtually be anything.
To address this issue, I've patched the drupal contact.module by adding a checkbox on the admin page of each contact form : "drupal is the sender". By default it's disabled, but if enabled, drupal will use the site-wide address to send the contact form mail. The reply-to address will contain the users's email address, still allowing to reply back to the sender (even if you're subscribed to the mailing list mentioned above).
Please review the patch and all comments are welcome.
| Comment | File | Size | Author |
|---|---|---|---|
| contact.patch | 2.43 KB | yoho |
Comments
Comment #1
dave reidI don't see this making it into core. There are better ways around it - you could add a hook_mail_alter that would alter messages from your contact form in the way you want.
Comment #2
maat_fr commentedWhen working in big communities with large teams this feature could be really nice.
using a hook is not really user friendly and would make it rather painful to configure some forms but not others.
this patch could be imporved to define a sender address for each form but i think it's already a nice proposal.
cheers