Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • After much wasted time and research it seems this problem was introduced around 5.4.

    There is a check around line 230 of includes/mail.php to see if the attachment is within wp-content. This check will fail if you have a web host which splits some files (eg. uploads) out of wp-content and then symlinks the dir. (I have always done this and never had a problem.)

    Here is the IF check;

    if ( ! wpcf7_is_file_path_in_content_dir( $path ) ) {

    I’ve tried the WPCF7_UPLOADS_TMP_DIR config constant fix suggested elsewhere, no luck. (The docs actually state this must be under the wp-content dir, so it makes sense that this doesn’t work.)

    I have had to hard code the IF statement to false within the plugin to fix the issue.

    Hope this helps someone else.

    If you have CF DB 7 or Flamingo your file uploads will be stored in WP admin, so this isn’t a huge problem if that’s an acceptable way for you to view the files, rather than attachments on the email sent.

    I do think this is a bug somewhere in CF7 and/or WP though. I’ll wait for @takayukister to reply 🙂

    We are also facing a similar problem since updating WordPress and CF7 recently. We have tried rolling back CF7 with no luck. I assume this must be a problem with WP 6.2.2. and CF7.

    We can successfully send attachments using wp_mail() as normal.

    There is a wp_mail() amend in the 6.2 field guide, regarding attachments. So I’m thinking this is quite likely to be a valid bug.

Viewing 3 replies - 1 through 3 (of 3 total)