First of all sorry for crossposting this (I also posted at Feeds Issues) but I don't know if the problem is here or there.

I'm using Mailhandler and Feeds to import e-mail attachments from an IMAP mailbox. Everything works perfectly except for the fact that the attachments don't get saved at the specified directory of my custom File Field. The attachments always get saved at sites/default/files/mailhandler_temp.

This is a really important thing in my system. Is this the correct behavior?

Also, later, I plan to use either Storage API or Amazon S3 modules to save the attachments directly into S3. I already tested Storage API with Form Submitted Files and it works great. For this test, I used EXACTLY the same field where the problem (bug?) with Mailhandler/Feeds happens.

Am I missing something?
Thanks!

Comments

Daniel Ferreira Jorge’s picture

nobody? :)

danepowell’s picture

That should just be the temporary directory, once Feeds finishes processing the import the file should get moved to a permanent location. However, a recent Feeds commit seems to have broken file mapping, so that may need to be fixed first.

kscheirer’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

Daniel, can you try updating to latest stable releases of both modules? The mailhandler_temp directory is just a waypoint, the files should definitely be moved out of there when the import is finished.

44vil4’s picture

Problem is mapping Body(htlm) to content.
When map from Body(text) to context likes ok.

44vil4’s picture

<img alt="" src="//mailhandler_temp/logo_3.png" width="147" height="28">

guenneguez_t’s picture

I solve problème with change in file plugins\mailhandler\commands\MailhandlerCommandsFiles.class.php line 31 :
$message['body_html'] = str_replace($uri, $file->uri, $message['body_html']);
with
$message['body_html'] = str_replace($uri, file_create_url($file->uri), $message['body_html']);

Thanks
Thomas