function contactform7_before_send_mail( $submission ) {
$submission = WPCF7_Submission::get_instance();
if ( $submission ) {
$formData = $submission->get_posted_data();
$uploaded_files = $submission->uploaded_files();
}
}
remove_all_filters ('wpcf7_before_send_mail');
add_action( 'wpcf7_before_send_mail', 'contactform7_before_send_mail' );