Dynamically specify the 'To' email/recipient using Contact Form plugin I'm trying to leverage the Contact Form plugin so I can dynamically specify the To email/recipient (via a text input, not as a hidden field). 

I've tried via my own plugin to tap into the beforeSend event and also via config (eg https://gist.github.com/cole007/e65f028cc58140ed3b0f6910fc9615d6). 

However, the sent message always defaults to send to the recipient specified in the plugin settings. Any thoughts on how to resolve, or if this is indeed possible?
Reading the documentation it sounds like you should be able to specify toEmail using a text input. I'm guessing that it is using the default email because you aren't validating the email address first.

&lt;input type="text" name="toEmail"&gt;

The plugin will get toEmail from the post request and validate it for use.

$toEmail = craft()-&gt;request-&gt;getPost('toEmail');
$toEmail = craft()-&gt;security-&gt;validateData($toEmail);