Closed (fixed)
Project:
Mailhandler
Version:
7.x-2.x-dev
Component:
Mailhandler
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 May 2012 at 17:33 UTC
Updated:
11 Jun 2018 at 19:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
danepowell commentedSorry about that. Come to think of it, I think I've since this bug before as well. I'll try to investigate but I don't have much time at the moment- if you are able to dig deeper and even contribute a patch, I'd appreciate it (and this will get solved faster! =D )
Comment #2
xvx commentedFrom syslog it is dropping "No Data!!" I also tested on the test mbox modules/mailhandler/tests/attachment1_mbox and the README_#.txt file is also showing up 0 bytes. So I'm guessing it has something to do with the get_parts function in /modules/mailhandler_php_imap/plugins/mailhandler/retrieve/MailhandlerPhpImapRetrieve.class.php. I'll continue to investigate to see if there is an issue here.
Can someone that has attachments working please let me know what version of PHP you are running, my current version is PHP 5.2.17. I just want to rule out any issues with php_imap
Comment #3
danepowell commentedI haven't had a chance to look at either issue in depth, but is it possible that this is a duplicate of #1482966: Attachments failing in multisite setups?
Comment #4
xvx commentedIt looks like that patch is for 7.x, but it still looks something like this was committed to the 6.x 2.5 branch.
if ($attachment->filename !== 'unnamed_attachment') {
$file = file_save_data($attachment->data, file_directory_temp() . '/' . mb_decode_mimeheader($attachment->filename));
$message['attachments'][] = new FeedsEnclosure($file, $attachment->filemime);
It's writing the file, with the proper filename, to /tmp/ but without data in it.
Comment #5
rsutaria commentedI'm having the same problem. MailHandler is correctly creating a node, but the attachment which has been mapped to an Image field is showing 0 bytes.
My PHP version is 5.2.17 and I'm on a shared hosted server (bluehost).
The MailHandler v I'm using is 7.x-2.5
P.S.: I'm also getting the "No Data!!" error in the logs. I also just applied this patch given here:
http://drupal.org/node/1555792#comment-5953776
But that has not helped. Any ideas?
Comment #6
naurisr commentedIn 7.x-2.5 I fixed this by replacing
with
in MailhandlerPhpImapRetrieve.class.php
Comment #7
rsutaria commentedthank you thank you so much!! :)
The fix you've suggested totally works! Thanks Naurisr!
Comment #8
danepowell commentedLet's see if this patch based on #6 passes testing. In the future, please keep in mind that patches are preferred to manual examples (like #6), since patches will automatically get tested. Thanks.
Comment #10
danepowell commentedHrm, it looks like all Mailhandler tests are failing at the moment. I'll try to fix that tomorrow and then re-queue #8 for testing.
Comment #11
danepowell commented#8: mailhandler-1597384-8.patch queued for re-testing.
Comment #12
danepowell commentedMarked #164278: imap_fetchbody() error -- no data? as dupe. This same bug I think results in a 'No data!!' error in the dblog.
Comment #13
danepowell commentedShould be fixed in 6.x-2.x and 7.x-2.x:
http://drupalcode.org/project/mailhandler.git/commit/be81392
http://drupalcode.org/project/mailhandler.git/commit/6e71f71
As I suspected, the patch in #8 was a bit of a hack and would probably cause problems with more complex multipart messages. So I solved it in a slightly different way.
Comment #14
danepowell commentedI did some more investigation and it turns out this is a regression caused by #1555792: Single-part media emails ignored
Comment #15
danepowell commentedRenamed issue title to better reflect the effects of the issue.
Comment #16
Makku01 commentedI am using 6.x .
I just tried the latest dev and the attachments are there but they are doubled, every attachment of the original mail is now attached 2 times to the new node.
also there is a problem with the textfield, it stops at the first unusual character (here:'ü')
switched back to 6.x 2.5 and the texfield was processed fine, but attachments not :-(
Comment #17
jurgenhaasI have had the same problem and can confirm that the commit in http://drupalcode.org/project/mailhandler.git/commit/6e71f71 has resolved it in my 7.x-2.5 installation.
Comment #18
snehi commentedThanks for making this patch available.
Comment #19
bkenro commentedFor my D6 site, http://drupalcode.org/project/mailhandler.git/commit/be81392 works fine.
Thanks for the patch!
Comment #21
kevin.klika commentedRunning current version of mailhandler and experienced this issue. Cleanly applied #8 and everything works now.
Comment #22
rosso69 commentedWorking with MailHandler 7.x-2.9+20-dev my files are all 0 bytes.
None of the patches above worked for me.
Using a clean Drupal 7.26 version with lates feeds (dev)
Try to put files in a public directory and upload_filesize is bigger then the attachted file.
When i manually create a node and attach the file it work. When i mail small files, it also works.
Bigger files are not imported. I cannot see any relation between upload_max_filesize and the filesize of the attachments.
Comment #23
rosso69 commentedI noticed that it has to do with character decoding. Plain ascii file with a couple of "a" in it work file, even large files.
How can i import a file without looking at coding?
Comment #24
replicaobscuraI seem to be having this same issue today on the latest release of the module. The patch in #8 is no longer relevant with the current code as far as I can see.
On one mailbox (Gmail) it works fine, and on another (Rackspace hosted mail) I get 0-byte attachments with the same files. Is anyone else still experiencing this?