function set_sessions($cf7){
$submission = WPCF7_Submission::get_instance();
if($submission) {
$posted_data = $submission->get_posted_data();
$_SESSION['contact_us_user_email'] = $posted_data['Email'];
}
return false;
}
add_action( 'wpcf7_before_send_mail', 'set_sessions' );

Advertisements