Contact form, how to direct an e-mail to a selected department?

Is it possible so that a user can select a certain department in a list box in my contactus.html page and this can then be re-directed to a specified e-mail address?

Currently the department is sent as a subject to one e-mail account. But I would like this to be re-directed to the correct department/email address. Im guessing it’s got to do with changing the mail function somehow.

The contact.html can be found here: http://www.suppleform.co.uk/pages/contactus.html

php code as follows:

<?php
$name = $_POST[‘username’];
$email = $_POST[‘email’];
$department = $_POST[‘department’];
$comment = $_POST[‘comment’];
//To, Subject, Message, Header
mail(‘ian@myemail.co.uk’, ’ ’ . $department . ’ ', $comment, ‘From: ’ . $name . ’ <’ . $email . ‘>’);
header(‘Location: contactusconfirmation.html’);

?>

Any help would be must appreciated. :thumb: