First part as in title and how to detect different webforms?
Ex. function name - hook_webform_submission_actions
Replace 'webform' with form id?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityIf you just want to customize the target email, webform do this quite easily.
Go to node/123/webform/emails
(where 123 is you nid) and there you can configure the recipients.
The option "component value" allows you for example to set the email regarding a select list. Configure a select list for the subject, put these values in the option textarea:
contac[email protected]|General inquiries
[email protected]|Marketing
Then when the user will use webform the email will be sent to the direction chosen in the subject list.
If you want something more advanced, have a look at my previous answer in "pass cck email value to webform block". This will help you to detect different webform (using hook_form_alter.