Closed (won't fix)
Project:
Mailhandler
Version:
6.x-1.x-dev
Component:
Mailhandler
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2011 at 10:51 UTC
Updated:
1 Aug 2013 at 15:47 UTC
The question is quite simple, just because the current invoke operation is not working, and I'm wondering if the reason why there are no any issues about this is because this hook has never been implemented in a contrib module.
This is the current code part invoking this hook:
// TODO: add arguments
function mailhandler_node_process_message($header, $origbody, $mailbox, $mimeparts) {
mailhandler_switch_user();
// we must process before authenticating because the password may be in Commands
$node = mailhandler_node_prepare_message($header, $origbody, $mailbox);
// Authenticate the message
if (!$node = mailhandler_mailhandler_authenticate('execute', $mailbox['authentication'], array($node, $header, $origbody, $mailbox))) {
watchdog('mailhandler', 'Message failed authentication', array(), WATCHDOG_ERROR);
return FALSE;
}
// Put $mimeparts on the node
$node->mimeparts = $mimeparts;
// we need to change the current user
// this has to be done here to allow modules
// to create users
mailhandler_switch_user($node->uid);
// modules may override node elements before submitting. they do so by returning the node.
foreach (module_list() as $name) {
if (module_hook($name, 'mailhandler')) {
$function = $name .'_mailhandler';
if (!($node = $function($node, $result, $i, $header, $mailbox))) {
And I stop here.. where do $result and $i come from? i'm sure they were lost during the refactoring done in #679796: Refactor mailhandler_retrieve_message to break out node-specific processing. My bet is that currently there are no implementation of this hook.. if so, perhaps it is time to change this a little bit.
Comments
Comment #1
ilo commentedmm, appart from listhandler that does implement it..
Comment #2
cor3huis commented$ grep -Ri "_mailhandler" *Gave in modules I've downloaded:
http://drupal.org/project/listhandler
http://drupal.org/project/media_mover
http://drupal.org/project/mailcomment
There are possibly some others...
Comment #3
ilo commentedThanks so muc, cor3huis, I'll will try to contact them to see if the found any issue regarding this hook. Aparently arguments are only reliable when fired though cron import.
Comment #4
danepowell commentedSorry, 6.x-1.x is no longer a supported release. Please try upgrading to 6.x-2.x and reopen if still an issue.