6.0.0-beta1
7/3/25

[#14610] 'attach_body_check' hook prevents IMP smartmobile view to send message with 'attachment' word when there's no attachment
Summary 'attach_body_check' hook prevents IMP smartmobile view to send message with 'attachment' word when there's no attachment
Queue IMP
Queue Version 6.2.18
Type Bug
State Resolved
Priority 2. Medium
Owners mrubinsk (at) horde (dot) org
Requester leonardo (at) cefetmg (dot) br
Created 04/13/2017 (3003 days ago)
Due
Updated 10/20/2017 (2813 days ago)
Assigned
Resolved 04/13/2017 (3003 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/20/2017 08:33:44 PM Git Commit Comment #6 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit 1a678052f4ba53a56e3bdc6d04a7f2c5c262a1d6
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu, 13 Apr 2017 15:36:29 -0400

Bug: 14610 Fix sending email after attch_body_check hook fails.

Need to add the compose object to the queue if we catch this
exception since the SmartMobile view does not get the cacheid when
the compose page is "loaded" since it's not (re)generated on each
compose action.

  M lib/Ajax/Application/Handler/Common.php

https://github.com/horde/imp/commit/1a678052f4ba53a56e3bdc6d04a7f2c5c262a1d6
04/13/2017 08:49:13 PM leonardo (at) cefetmg (dot) br Comment #5 Reply to this comment

[Show Quoted Text - 17 lines]
Thank you Mike!

The solution -- I had to hack the code as my IMP is 6.2.2 -- worked 
beautifully.

Regards,
Leonardo

04/13/2017 07:38:07 PM Michael Rubinsky Comment #4
Assigned to Michael Rubinsky
State ⇒ Resolved
Version ⇒ 6.2.18
Reply to this comment
IMP 6.2.19
04/13/2017 07:37:26 PM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit 9333bcbcdf64176e824858dfe2004f801b549f19
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Apr 13 15:32:35 2017 -0400

     Bug: 14610 Fix sending email after attch_body_check hook fails.

     Need to add the compose object to the queue if we catch this
     exception since the SmartMobile view does not get the cacheid when
     the compose page is "loaded" since it's not (re)generated on each
     compose action.

  imp/lib/Ajax/Application/Handler/Common.php | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

http://github.com/horde/horde/commit/9333bcbcdf64176e824858dfe2004f801b549f19
04/13/2017 07:34:46 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 2d40f76239b45c84aad57deddd5c5f37319ad8e3
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Apr 13 15:32:35 2017 -0400

     Bug: 14610 Fix sending email after attch_body_check hook fails.

     Need to add the compose object to the queue if we catch this
     exception since the SmartMobile view does not get the cacheid when
     the compose page is "loaded" since it's not (re)generated on each
     compose action.

  imp/lib/Ajax/Application/Handler/Common.php | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

http://github.com/horde/horde/commit/2d40f76239b45c84aad57deddd5c5f37319ad8e3
04/13/2017 05:09:56 PM leonardo (at) cefetmg (dot) br Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ 'attach_body_check' hook prevents IMP smartmobile view to send message with 'attachment' word when there's no attachment
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Scenario: User is composing a message on the IMP smartmobile view. The 
'attach_body_check' IMP hook is enabled and configured with a set of 
'attachments' keywords. Horde/IMP is installed using Debian 8 official 
packages, Horde is 5.2.1 and IMP is 6.2.2.

It's well know that Debian ships a jQuery version which is not IMP 
compatible. So, to be able to use even the very basic mail features in 
smartmobile view, I needed to

jQuery / jQuery-mobile libs was update to versions 1.12.4 / 1.3.2, 
this done just by sym-linking default files to the updated ones. Horde 
smartmobile view worked correctly (not only IMP, but Turba, Kronolith 
and Ingo also).

Symptoms: When using the IMP smartmobile view, it will not be possible 
to send a message without attachments if in the message body text 
there is any of the keywords defined in the 'attach_body_check' IMP 
hook.

The first attempt to send will show -- as it is expected -- a warning 
message informing that none attachments are indeed present. However, 
the next attempts present the same behavior: a message warns about the 
absence of attachments and the message is not sent. It will only be 
sent if: 1) you remove the keyword(s) from the message, or 2) add some 
attachment, or 3) disable the hook.

Remarks:
1. Only the smartmobile view is affected. Dynamic view on both desktop 
and mobile main browsers sends the messages at the 2nd attempt.
2. The tests where performed with the default Horde and IMP prefs. The 
only hook enabled was 'attach_body_check'.
3. This issue also affects IMP 6.2.17 which is in the 'php-horde-imp' 
Debian stretch package.

Saved Queries