<?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>imap_append in Message.php fails with no errors</title> 
  <pubDate>Fri, 10 Apr 2026 13:16:51 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/3687</link> 
  <atom:link rel="self" type="application/rss+xml" title="imap_append in Message.php fails with no errors" href="https://bugs.horde.org/ticket/3687/rss" /> 
  <description>imap_append in Message.php fails with no errors</description> 
 
   
   
  <item> 
   <title>On line 218 of Message.php (v 1.164.8.34), the call to imap_</title> 
   <description>On line 218 of Message.php (v 1.164.8.34), the call to imap_append() was returning false with no errors. I was finally able to resolve the problem by changing the imap_append() call to use IMP::serverString() (much like the imap_append() call on line 539).



Here is the original version:



/* Save messages in Trash folder. */

foreach ($msg_text as $val) {

if (!@imap_append($imp[&#039;stream&#039;], $trash, $val)) {



Here it is after the fix:



$folderstring = IMP::serverString($trash);

/* Save messages in Trash folder. */

foreach ($msg_text as $val) {

if (!@imap_append($imp[&#039;stream&#039;], $folderstring, $val)) {</description> 
   <pubDate>Fri, 24 Mar 2006 22:54:25 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/3687#t18128</link> 
  </item> 
   
  <item> 
   <title>Works perfectly for me without that change.</title> 
   <description>Works perfectly for me without that change.</description> 
   <pubDate>Sat, 25 Mar 2006 11:54:07 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/3687#t18133</link> 
  </item> 
   
  <item> 
   <title>Thanks for checking it out. I&#039;m sure it works for many peopl</title> 
   <description>Thanks for checking it out. I&#039;m sure it works for many people without the change, but it definitely wasn&#039;t working for us. Using tcpdump showed PHP wasn&#039;t even attempting the append operation; it returned false immediately, as though it didn&#039;t like the format of one of the parameters. It made sense after I looked at other calls to imap_append(). Why wouldn&#039;t both calls to imap_append() in Message.php use the same calling syntax (with a fully qualified &quot;{server}mailbox&quot; rather than just &quot;mailbox&quot;)? The sample in the PHP documentation uses a fully qualified mailbox as well:



http://www.php.net/manual/en/function.imap-append.php



The way it is now, I&#039;m sure it works for many sites, but it definitely doesn&#039;t work for all. I&#039;m not surprised more people haven&#039;t noticed it, because this code probably isn&#039;t used often. It&#039;s only used when the trash folder is enabled, and the user&#039;s quota prevents them from copying a deleted message to the trash, and apparently it&#039;s only a problem for certain configurations.



Fyi, on the web server we&#039;re using php 4.3.9 (the Red Hat Enterprise Linux 4 package php-4.3.9-3.9) with c-client 2002e (libc-client-2002e-14). The IMAP server is Cyrus 2.2.12 (cyrus-imapd-2.2.12-3.RHEL4.1).</description> 
   <pubDate>Sat, 25 Mar 2006 18:40:53 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/3687#t18135</link> 
  </item> 
   
  <item> 
   <title>Fixed in HEAD and 4.1.1.</title> 
   <description>Fixed in HEAD and 4.1.1.</description> 
   <pubDate>Tue, 28 Mar 2006 17:25:45 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/3687#t18315</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
