6.0.0-alpha14
7/2/25

[#13453] IMP Hooks pre_sent
Summary IMP Hooks pre_sent
Queue IMP
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester hamid (at) sadeghi (dot) co (dot) uk
Created 08/18/2014 (3971 days ago)
Due
Updated 03/11/2015 (3766 days ago)
Assigned 08/18/2014 (3971 days ago)
Resolved 03/11/2015 (3766 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/11/2015 04:19:20 AM Michael Slusarz Comment #6
State ⇒ Resolved
Reply to this comment
IMP 7.0.
03/11/2015 04:18:38 AM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (master):

commit 7cc3d8bc2b79999708f84bcf420494c013f82a48
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Tue Mar 10 21:43:51 2015 -0600

     Refactor sending code

     Only send one message always. This ensures we don't run into
     process/send limitation in the middle of sending messages.

     S/MIME encryption was the only case where we were sending multiple
     messages, by S/MIME encrypted data supports multiple public certs per
     message (like PGP) so use that to combine into a single message.

     Additionally, sending the same message separately to multliple different
     recipients was incorrect since it was re-using the same message-id

     All changes made to headers object via pre_sent hook is now reflected in
     outgoing message (Implements Request #13453)

  imp/config/hooks.php.dist |    6 +-
  imp/docs/CHANGES          |    2 +
  imp/lib/Compose.php       |  578 
+++++++++++++++++++++++++--------------------
  imp/package.xml           |    1 +
  4 files changed, 326 insertions(+), 261 deletions(-)

http://github.com/horde/horde/commit/7cc3d8bc2b79999708f84bcf420494c013f82a48
08/19/2014 03:15:41 AM Michael Slusarz Comment #4 Reply to this comment
It seems that this might takes some time to do. Is there a quick way 
I can add an email address to Bcc of all emails for now?
Directly edit the code in the IMP_Compose object.
08/19/2014 01:00:25 AM hamid (at) sadeghi (dot) co (dot) uk Comment #3 Reply to this comment
It seems that this might takes some time to do. Is there a quick way I 
can add an email address to Bcc of all emails for now?

[Show Quoted Text - 15 lines]
08/18/2014 11:47:55 PM Michael Slusarz Comment #2
Version ⇒ Git master
State ⇒ Assigned
Assigned to Michael Slusarz
Reply to this comment
This was intentional, because the hook is called AFTER recipient 
checks are done.  So adding additional recipients could possibly 
exceed those limits.  (The hook was originally designed as a way to 
add headers, rather than alter existing headers).

That being said... I guess it should be up to the admin to determine 
if they want to exceed the various resource limits by adding 
addresses/attachments/etc.

This is going to take a bit of work though, since the address parsing 
code is separate from the code where the hook is called - we are going 
to have to reparse the address headers if the hook exists in order to 
pick up the correct list of recipients.  (Note that this has nothing 
to do with the Bcc header - any address header will not pick up any 
changes made in the hook).
08/18/2014 10:20:07 PM hamid (at) sadeghi (dot) co (dot) uk Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ IMP Hooks pre_sent
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Whilst custom headers can be added in pre_sent hook, Bcc header is 
added but ignored. It seems that Bcc header is added after the email 
has been sent.

This is in latest Groupware Webmail edition 5.2.1 in Debian 6 
installed via pear.

Saved Queries