I'm developing a Drupal 7 website. The website has a couple of forms which take a users email address. As part of the process I need to be able to submit the email to a mailing list across an API.
I have all the calls written and tested for adding new users to mailing lists etc. What I'm not so sure of is how I get this code to run when the form is submitted on the Drupal site.
I assume there will be a hook function but I'm struggling to track it down. My forms are setup using Webforms module.