I'm using the default D7 contact form to have anonymous users enter some information. I've created various categories and based on the category the message should be emailed to a single or multiple email addresses. The email addresses are valid addresses comma separated as described by D7.

This has worked fine for many years but recently emails are refused by Google due to multiple addresses in the From: header. So D7 sends the content of the contact form to both email addresses but also to the email address entered but with the entire list of email addresses in the From: header.

Is there a way to have both? i.e.

  • copy of the message sent to the user, with a single, preset email address
  • message sent to a list of email addresses based on the category.

Preferably with the standard contact form or with a separate module.

1 Answer 1


Despite being an old post, I think it warrants an answer for those sites still operating on Drupal 7 or even Drupal 8. Rather than use the built-in Contact form, I recommend using the Webform module. Below is a description of how it can be used for a contact form of this nature, with Drupal 7 specific screenshots.

If you setup your contact form using the Webform module, you can setup distinct emails, one for each purpose. In both cases, the "from" setting can be set to one unique site email address, a preset/predefined email address in the configuration, or one email address from the form itself.

webform emails webform email configuration

  • This sounds like a good idea. Need to check this out more.
    – hepabolu
    Commented Aug 30, 2018 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.