Hi, I have setup a mailhandler mailbox and feed importer. I believe? I have enabled the correct permissions. I am able to import emails and save the files on the server over IMAP:
- the subject is mapped to the node Title
- the origbody is mapped to the node Body
- message_id is mapped to GUID which is set as the Unique target

In MailhandlerParser.inc, the attachments are add to the message here (line 55):
$message['attachments'][] = new FeedsEnclosure($file, $attachment->filemime);

Do I need to map the mimeparts or attachments to something? What target? I have tried Body, References and Threading.

Is Mailsave still required? It seems like it is not? I have tried with it enabled and without.

I am trying to go through the code (newish to Drupal and PHP), and I don't see any of the Mailhandler hooks getting called, i.e.

/**
* Implementation of hook_mailhandler
*/
function mimerouter_mailhandler($node, $result, $i, $header, $mailbox) {
dd('..... entering mimerouter_mailhandler');
... produces no log output

Any ideas or tips on debugging?

-Rob

CommentFileSizeAuthor
#2 email_harvest.zip10.53 KBRobKoberg

Comments

Ian Ward’s picture

Status: Active » Postponed (maintainer needs more info)

Try creating a File field with the filefield module, then map "attachments" to "File" ("File" will only be available if you have a file field on your content type). As for mapping to the "Upload" core field, you might try http://drupal.org/project/feeds_imagegrabber though I've not tried that one. Feeds core supports filefield, not upload core field, AFAIK. Please let me know how this works out for you.

RobKoberg’s picture

StatusFileSize
new10.53 KB

I decided to try and rewrite it for d7. I have something working. I do most of the work in the FetcherResult and use the Parser to arrange the data for the standard feeds NodeProcessor. It doesn't have all the options mailhandler has, but I have attached it to check out. Warning: newish to php and drupal... Very open to critique/advice

Ian Ward’s picture

You do know that the 2.x branch is mostly working? I'm curious, what are your goals with rewriting it versus upgrading it to 7.x? There's a related thread here http://drupal.org/node/554428 to the D7 upgrade. Please close this case if your original question is answered and D7 can be discussed on http://drupal.org/node/554428 ... btw hook_mailhandler no longer exists in the 2.x branch, there are core hooks and feeds hooks which make it unnecessary.

RobKoberg’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)