6.0.0-alpha10
5/14/25

[#15103] sending linked attachment gives error
Summary sending linked attachment gives error
Queue IMP
Queue Version 6.2.27
Type Bug
State Unconfirmed
Priority 1. Low
Owners
Requester spaarder (at) hotmail (dot) nl
Created 04/15/2022 (1125 days ago)
Due
Updated 07/04/2024 (314 days ago)
Assigned
Resolved
Milestone
Patch No

History
07/04/2024 02:48:24 PM gilles (dot) buisson (at) namebay (dot) com Comment #3 Reply to this comment
I can confirm the bug, on IMP 6.2.27, attachment as a link when exceed 
max size works when mail is plain text but not when it's html.
Adding the line $body=""; seems resolving the problem
04/15/2022 10:12:08 AM spaarder (at) hotmail (dot) nl Comment #2 Reply to this comment
The problem does NOT arise when the message is sent as a plain text 
(being NOT html)...
04/15/2022 09:59:20 AM spaarder (at) hotmail (dot) nl Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ sending linked attachment gives error
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
Reply to this comment
When sending an attachment that is so large that it will be sent as a 
linked attachment, the following error occurs:

Apr 15 11:42:53 cloudserver2 HORDE: [imp] Error: Object of class 
DOMElement could not be converted to string in 
/usr/share/horde/imp/lib/Compose.php:2934
Apr 15 11:42:53 cloudserver2 HORDE: Stack trace:
Apr 15 11:42:53 cloudserver2 HORDE: #0 
/usr/share/horde/imp/lib/Compose.php(1541): 
IMP_Compose->_linkAttachments()
Apr 15 11:42:53 cloudserver2 HORDE: #1 
/usr/share/horde/imp/lib/Compose.php(811): 
IMP_Compose->_createMimeMessage()
Apr 15 11:42:53 cloudserver2 HORDE: #2 
/usr/share/horde/imp/lib/Ajax/Application/Handler/Common.php(540): 
IMP_Compose->buildAndSendMessage()
Apr 15 11:42:53 cloudserver2 HORDE: #3 
/usr/share/php/Horde/Core/Ajax/Application.php(175): 
IMP_Ajax_Application_Handler_Common->sendMessage()
Apr 15 11:42:53 cloudserver2 HORDE: #4 
/usr/share/horde/services/ajax.php(61): 
Horde_Core_Ajax_Application->doAction()
Apr 15 11:42:53 cloudserver2 HORDE: #5 {main} [pid 7653 on line 74 of 
"/usr/share/php/Horde/ErrorHandler.php"]

The problem is in line 2931 of Compose.php, where the problem seems to 
be that $body is uninitialized.
Inserting:
         $body="";

at line 2924 seems to solve the problem.

Saved Queries