If I create a feeds importer, set the fetcher to a "Mailhandler Fetcher" and tell that fetcher to retrieve both nodes and comments ("all"), it returns an error 500. The error occurs only if there is mail to be retrieved.
If I set the fetcher to "Nodes only" or "Comments only", no error occurs.
The error in the apache log is as follows:
PHP Fatal error: Cannot instantiate abstract class MailhandlerFilters in /var/www/sites/all/modules/mailhandler/mailhandler.module on line 168, referer: http://localhost/batch?op=start&id=14
On a tangent, I have to admit I'm a bit confused here... is MailFetcher only for Nodes, and MailComment only for comments? Is MailFetcher using the in-reply-to mail header tag to distinguish between nodes and comments - and therefore ignores replies when pulling from the mailbox?
I'll keep plugging away on the mailflow docs to see if I can wrap my head around this.
Comments
Comment #1
trevorbradley commentedDuplicate of http://drupal.org/node/1369672?
Comment #2
trevorbradley commentedDuplicate (though my confusion about nodes vs comments still stands)
Comment #3
danepowell commentedMailhandler is generally agnostic to whether a message is a node or comment- all it does is fetch the message, parse it, and pass it off to a processor (either the FeedsNodeProcessor or FeedsCommentProcessor). This is why the node/comment fetcher filters exist- you should choose the filter that matches the processor you will use.
Theoretically, you could retrieve comments with Mailhandler alone (i.e. without Mail Comment), as long as you could somehow extract a parent nid/cid, say from commands. Mail Comment just makes the insertion/extraction of the nid/cid automatic and mostly invisible to the end user.
Does that clear up the confusion? Can you suggest any way to improve the documentation or help text to reflect this?
Comment #4
trevorbradley commentedI've been working on this all yesterday (getting all the way back to RFC822 to understand mail headers)... it does make sense now.. I think my confusion was over terminology (replied to mail = comment in the context of the feeds importer). Ideally if the fetcher is set to "All" it should ignore the "in-reply-to" mail header rather than doing only retrieving original messages or only replies.
I'm working on building a mailflow system for task management - I've actually decided to go with a Node importer for both orignial emails and email replies, and then using the Rules module to parse and act upon the resultant email data. MailComment proved significantly more complicated and I decided to pass on it. I'm planning on parsing the Body of the email to allow users to pass "commands" to the mailflow system. For example, cc'ing the mailflow system on all office emails. When the mail recipient replies to all that a task is complete, the can add a tag "[DONE]" in the text of their email, and the mailflow system will register the task complete.
Now that I've figured out all the quirks and conventions, mailhandler is proving to be very robust. Thanks for the module!