Trouble with Formit &emailTo and Dropdown Selection

Thank you for your reply.
I’m going to try this snippet and see if it works

<?php
// Get the value of the recipient from the submitted form
$recipient = $hook->getValue('recipient');

// Set the email recipient based on the dropdown value
switch ($recipient) {
	case 'option1':
		$emailTo = '[email protected]';
		break;
	case 'option2':
		$emailTo = '[email protected]';
		break;
	case 'option3':
		$emailTo = '[email protected]';
		break;
	default:
		$emailTo = '[email protected]'; // Default email address
		break;
}

// Set the emailTo parameter for FormIt
$hook->formit->config['emailTo'] = $emailTo;

return true;