<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>sending linked attachment gives error</title> 
  <pubDate>Sun, 05 Apr 2026 08:44:51 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/15103</link> 
  <atom:link rel="self" type="application/rss+xml" title="sending linked attachment gives error" href="https://bugs.horde.org/ticket/15103/rss" /> 
  <description>sending linked attachment gives error</description> 
 
   
   
  <item> 
   <title>When sending an attachment that is so large that it will be </title> 
   <description>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-&gt;_linkAttachments()
Apr 15 11:42:53 cloudserver2 HORDE: #1 /usr/share/horde/imp/lib/Compose.php(811): IMP_Compose-&gt;_createMimeMessage()
Apr 15 11:42:53 cloudserver2 HORDE: #2 /usr/share/horde/imp/lib/Ajax/Application/Handler/Common.php(540): IMP_Compose-&gt;buildAndSendMessage()
Apr 15 11:42:53 cloudserver2 HORDE: #3 /usr/share/php/Horde/Core/Ajax/Application.php(175): IMP_Ajax_Application_Handler_Common-&gt;sendMessage()
Apr 15 11:42:53 cloudserver2 HORDE: #4 /usr/share/horde/services/ajax.php(61): Horde_Core_Ajax_Application-&gt;doAction()
Apr 15 11:42:53 cloudserver2 HORDE: #5 {main} [pid 7653 on line 74 of &quot;/usr/share/php/Horde/ErrorHandler.php&quot;]

The problem is in line 2931 of Compose.php, where the problem seems to be that $body is uninitialized.
Inserting:
        $body=&quot;&quot;;

at line 2924 seems to solve the problem.
</description> 
   <pubDate>Fri, 15 Apr 2022 09:59:20 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/15103#t94007</link> 
  </item> 
   
  <item> 
   <title>The problem does NOT arise when the message is sent as a pla</title> 
   <description>The problem does NOT arise when the message is sent as a plain text (being NOT html)...</description> 
   <pubDate>Fri, 15 Apr 2022 10:12:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/15103#t94008</link> 
  </item> 
   
  <item> 
   <title>I can confirm the bug, on IMP 6.2.27, attachment as a link w</title> 
   <description>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&#039;s html.
Adding the line $body=&quot;&quot;; seems resolving the problem</description> 
   <pubDate>Thu, 04 Jul 2024 14:48:24 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/15103#t94204</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
