Found the problem and a solution:
These lines of code are the culprits:
????????????????if ( ! wpcf7_is_file_path_in_content_dir( $path ) ) {
????????????????????if ( WP_DEBUG ) {
????????????????????????trigger_error(
????????????????????????????sprintf(
????????????????????????????????/* translators: %s: Attachment file path.?
????????????????????????????????__( ‘Failed to attach a file. %s is not in the allowed directory.’, ‘contact-form-7’ ),
????????????????????????????????$path
????????????????????????????),
????????????????????????????E_USER_NOTICE
????????????????????????);
????????????????????}
????????????????????return false;
????????????????}
As far as I can see these lines do nothing useful, because there is a check if the folder is writeable a few lines later.