<?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>Hiding addresses of multiple recipients</title> 
  <pubDate>Fri, 10 Apr 2026 08:19:54 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/3028</link> 
  <atom:link rel="self" type="application/rss+xml" title="Hiding addresses of multiple recipients" href="https://bugs.horde.org/ticket/3028/rss" /> 
  <description>Hiding addresses of multiple recipients</description> 
 
   
   
  <item> 
   <title>When viewing one message with multiple recipients in the TO </title> 
   <description>When viewing one message with multiple recipients in the TO or CC field, the user may have to scroll down to see the body of the message, the recipient addresses taking too much space.



I propose to make it possible to hide the recipient addresses with CSS as it is currently possible for quoted text.



Here&#039;s a patch for &quot;imp/lib/MIME/Headers.php&quot; that will replace the addresses by a link if there are more than 20 recipients:



--- Headers.php.orig    2005-11-22 16:59:40.549264024 -0500

+++ Headers.php 2005-11-23 15:28:19.416656176 -0500

@@ -212,9 +212,19 @@

             $ret = _(&quot;Undisclosed Recipients&quot;);

         } else {

             /* Build the address line. */

-            $ret = &#039;&lt;span class=&quot;nowrap&quot;&gt;&#039; . implode(&#039;,&lt;/span&gt; &lt;span class=&quot;nowrap&quot;&gt;&#039;, $addr_array) . &#039;&lt;/span&gt;&#039;;

+            if (count($addr_array) &gt; 20) {

+                Horde::addScriptFile(&#039;hideable.js&#039;, &#039;horde&#039;, true);

+                Horde::addScriptFile(&#039;addressesBlocks.js&#039;, &#039;imp&#039;);

+                

+                $ret = &#039;&lt;div id=&quot;at_&#039; . $field . &#039;&quot;&gt;&#039; .

+                    Horde::link(&#039;#&#039;, &#039;&#039;, &#039;widget&#039;, &#039;&#039;, &#039;toggleAddressesBlock(\&#039;&#039; . $field . &#039;\&#039;, \&#039;&#039; . count($addr_array) . &#039;\&#039;); return false;&#039;, &#039;&#039;, &#039;&#039;) .

+                    sprintf(_(&#039;[Show addresses - %s recipients]&#039;), count($addr_array)) . &#039;&lt;/a&gt;&lt;/div&gt;&#039; .

+                    &#039;&lt;div id=&quot;ab_&#039; . $field . &#039;&quot; style=&quot;display: none;&quot;&gt;&lt;span class=&quot;nowrap&quot;&gt;&#039; . implode(&#039;,&lt;/span&gt; &lt;span class=&quot;nowrap&quot;&gt;&#039;, $addr_array) . &#039;&lt;/span&gt;&lt;/div&gt;&#039;;

+            } else {

+                $ret = &#039;&lt;span class=&quot;nowrap&quot;&gt;&#039; . implode(&#039;,&lt;/span&gt; &lt;span class=&quot;nowrap&quot;&gt;&#039;, $addr_array) . &#039;&lt;/span&gt;&#039;;

+            }

         }



The javascript file &quot;imp/templates/javascript/addressesBlocks.js&quot; must be created with the following content:



function toggleAddressesBlock(field, count)

{

    var block = new Horde_Hideable(&#039;ab_&#039; + field);



    block.toggle();

    text = document.createTextNode(block.shown() ?

                                   &#039;&lt;?php echo _(&quot;[Hide Addresses]&quot;) ?&gt;&#039; :

                                   &#039;&lt;?php echo _(&quot;[Show Addresses -&quot;) ?&gt; &#039; + count + &#039; &lt;?php echo _(&quot;recipients]&quot;) ?&gt;&#039;);

    link = document.createElement(&#039;A&#039;);

    link.href = &#039;&#039;;

    link.className = &#039;widget&#039;;

    link.onclick = function() {

        toggleAddressesBlock(field, count);

        return false;

    }

    link.appendChild(text);



    var toggle = document.getElementById(&#039;at_&#039; + field);

    if (toggle.firstChild) {

        toggle.removeChild(toggle.firstChild);

    }

    toggle.appendChild(link);

}



Finally, the following strings will have to be localized:



&quot;[Show Addresses -&quot;

&quot;recipients]&quot;

&quot;[Hide Addresses]&quot;

&quot;[Show addresses - %s recipients]&quot;</description> 
   <pubDate>Wed, 23 Nov 2005 20:51:42 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/3028#t13988</link> 
  </item> 
   
  <item> 
   <title>What timing - this just made it onto my TODO list about a we</title> 
   <description>What timing - this just made it onto my TODO list about a week ago when someone sent me a message with 1100 recipients listed in the To: field.



The patches have been committed to HEAD and IMP 4.1.  Thanks for the submissions, although we ask that you attach diffs as attachments next time instead of inline.</description> 
   <pubDate>Thu, 24 Nov 2005 06:30:20 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/3028#t14002</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
