Hi idealien,
you did not mention following:
How do you send the mail? Which plugin? Is the attachment somewhere in the WP_CONTENT directory?
Please give me details allowing to reproduce this.
Please check if https://wordpress.org/support/topic/using-contact-form-7?replies=6 is relevant for this issue.
Hey,
Using wp_mail directly, or through Gravity Forms, same result. I’ve tried with it in the WP_CONTENT directory and from the gravity_forms path inside the uploads folder.
The other thread you mention does reduce the scope of issue (that it must be in WP_CONTENT dir), but not resolve the issue itself. Here’s a snippet example – http://pastebin.com/9Mc2eHaq
Please check with
foreach( $attachments as $attachment ) {
print_r( is_file( $attachment ) ? "Is a file" : "Not a file" );
}
If the paths are ok. Or use ls.
The other thread you mention does reduce the scope of issue (that it must be in WP_CONTENT dir), but not resolve the issue itself.
Please execute
print_r ( wp_upload_dir() );
In my case the output is:
Array (
[path] => /srv/www/wordpress-develop/src/wp-content/uploads/2016/02
[url] => http://src.wordpress-develop.dev/wp-content/uploads/2016/02
[subdir] => /2016/02
[basedir] => /srv/www/wordpress-develop/src/wp-content/uploads
[baseurl] => http://src.wordpress-develop.dev/wp-content/uploads
[error] =>
)
Do you want to do a screen sharing?
(
[path] => /srv/www/example.dev/current/web/wp-content/uploads/sites/2/2016/02
[url] => http://example.dev/subsitename/wp-content/uploads/sites/2/2016/02
[subdir] => /2016/02
[basedir] => /srv/www/example.dev/current/web/wp-content/uploads/sites/2
[baseurl] => http://example.dev/subsitename/wp-content/uploads/sites/2
[error] =>
)
The other test indicates “Attachment: Is a file”
Now that I know the issue is not with the actual message, just the logging of it, I can work around the issue until a fix is available. I expect that if you setup a local site as a multisite environment you will experience the same issue which would be needed to develop / test.
Works just fine on my multisite.
The only difference is the sites/2/ stuff in the upload dir. I don’t actually know how to configure WP to use this path. Any fancy defines on your side?
Edit:
Never mind. I’m able to reproduce this! I just used the first created network site for testing. But path’s are different on the other network sites only.
Hi idealien,
I have created a beta version with a fix you can try:
https://github.com/No3x/wp-mail-logging/releases/tag/beta%2F1.6.0R5
(You should not install this on production. After installation you need to alter some options of the plugin in the database to get a clean state again. Let me know If you need help.)
And the issue:
https://github.com/No3x/wp-mail-logging/issues/35