Set the reply address for the contact form to user's mail address I have a Drupal 7 site with only few modifications and I have the /contact form enabled for anonymous and registered users, so that they can contact the admin (i.e. me) easily.

What irritates me is that their messages always have my own mail address as the reply address. And so in order to reply to them, I have to search my "Sent items" folder for the user name (I relay the mails through gmail at my CentOS server).

Isn't there a way to set the reply addresses to the ones of registered users and why isn't it done by default?

I've added apache to /etc/mail/trusted-users to get rid of the following mail header:


  X-Authentication-Warning: mysite.com: apache set sender to my@email.com using -f


But still, I see the "From" header is always set to the admin mail address.
Isn't there a way to set the reply addresses to the ones of registered users and why isn't it done by default?


When authenticated users send a message using the system contact form, the email address assigned to the sent message is the one set for their user account; I just tested it on my Drupal 7 test site, and I can confirm it works that way.

The issue you are seeing is probably caused by the fact you are relaying the emails through Gmail.
If you need to add any header to the email sent from Drupal to resolve this problem, then you can implement hook_mail_alter() in a custom module.