How can I track user contact form submissions on Drupal 6?
I'm thinking of something similar to the webform results table but for user contact forms.
If not something that complex, then just simple statistics on contact form use, e.g. "UserX received 10 emails this month."
I'm pretty sure I'll have to create my own module which is fine, I just need to know how to go about this.
Do you have any ideas?
What you could try is:
use hook_mail_alter() to check when mails have been send and store the information you need in a special table of your own module. Maybe the information in the
$message is enough for you. If not you could try:
hook_fom_alter() to add an extra submit-handler to the contact form like this:
$form['#submit'] = 'my_custom_submit_handler';
my_custom_submit_handler($form, &$form_state) you should have full access to the form fields and store everything you need like you want to.
The Maillog / Mail Developer module will show you a log of all emails sent.