[Tickets #10306] Re: Unable to get message content on pre_sent hook

bugs at horde.org bugs at horde.org
Wed Jul 20 14:29:15 UTC 2011


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/10306
------------------------------------------------------------------------------
  Ticket             | 10306
  Updated By         | rui.carneiro at portugalmail.net
  Summary            | Unable to get message content on pre_sent hook
  Queue              | IMP
  Version            | Git master
  Type               | Bug
  State              | Not A Bug
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
+New Attachment     | 0001-Build-mime-ids-before-using-IMP_Contents.patch
------------------------------------------------------------------------------


rui.carneiro at portugalmail.net (2011-07-20 14:29) wrote:

> Added code to hooks.php to always grab the plaintext portion of the message.

I was testing this hook now but I am still unable to use it :\

After some debug I found the problem. The Horde_Mime_Part received on  
pre_sent hook do not have any mimeid set so the contentTypeMap method  
always returns the first part only (multipart/alternative).

I fixed this using $message->buildMimeIds() just before using IMP_Contents.

I have no idea why this is happening.






More information about the bugs mailing list