I was able to do this by linking to the send message page and using a querystring variable, then grabbing that variable with php/jquery, and placing it in the to box…
so on fep-class.php, around line 507 i put:
<?php
$user = htmlspecialchars($_GET['user']);
?>
<script>
$(window).load(function(){
$('#search-q').val('<?php echo $user ?>');
});
</script>
To make sure this works correctly you have to be linking to the send message page with a querystring variable. Your send message page may not be the same as mine but something along the lines of.
<?php
$user_ID = 1;
//There are many ways to get the user object, this is just an example
$user = get_user_by('id', $user_ID);
$user_to_message = $user->username;
?>
<a href="<?php echo home_url(); ?>/messages/?fepaction=newmessage&user=<?php echo $user_to_message; ?>" Send Message </a>