I have tried this one, but it does not work.
add_Action( ‘wpcf7_before_send_mail’,
function( $contact_form, $abort, $submission ) {
// Getting user input through the your-message field
$your_message = $submission->get_posted_data( ‘your-message’ );
$your_message = strtoupper($your_message);
},
10, 3
);`