How can I notify an admin when a user is contacted? On my Drupal 7 site, I have a user contact form.  How can I alter the form so that an admin is notified when the form is submitted?
In a custom module

hook_form_alter() yourForm.


Add custom submit handler, it will run alongside with your defaut submit

$form['#submit'][] = 'yourSubmitFunction';


Inside your custom submit handler use drupal_mail() or any other result you need

function yourSubmitFunction($form, &amp;$form_state) {
  drupal_mail()
  ....
}


Note: the form_state array contains all the submited values.