When combined with mailsave_to_imagefield, all attached files are passed to imagefield, disregarding their type (pdf, xls...).
After disabling the module, mailsave correctly saves attached files as such.

Comments

Stuart Greenfield’s picture

Assigned: Unassigned » Stuart Greenfield
Status: Active » Fixed

Ah - this is in part a problem with image field and part mailsave to image field. The official release of image field doesn't yet include the ability to set allowable image extensions, but the 5--2 branch does. However, a bug in mailsave to image field meant that in this case it was incorrectly treating all file types as images!

I've uploaded a fix to HEAD, which means that if allowable extensions are defined then they will be used, and in all cases the mime type will be checked to see that it is an image type by using the mime data. This should work properly with the current official image field.

My only concern is that some mail clients (e.g. my hosts webmail client) report images as octet streams, so these would be rejected. I'll come back to that later as I'm pretty busy on other (non-Drupal!) things at the moment.

Let me know if the HEAD version works for you (it does for me on test system). If OK I'll release it officially.

Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

brownatduke’s picture

Component: Miscellaneous » Code
Priority: Critical » Normal
Status: Closed (fixed) » Active
StatusFileSize
new18.23 KB
new11.93 KB

I'm having the same issue with Drupal 5.7, mailsave-5.x-3.3, and mailhandler-5.x-1.4. As shown below, if I attach a pdf I get new content with no visible attachment, but when I edit the content, the attachment is there under image attachments. If I manually navigate to the url of the image that is the left-most "ECE271HW7.pdf" I get my attachment. Very odd.

Note, if I disable the CCK Image option in the mailsave module, then Retrieve in mailhandler just sends me to a blank page and performs no action (also failing to log any action).