[imp] Re: expand names on send?

Liam Hoekenga liamr@umich.edu
Thu, 13 Jun 2002 15:26:49 -0400


> I realize that the logic is imcomplete / flawed , but I was wondering if
> anyone had done any work or thought about a feature like this since it was 
> discussed on the list a few months ago?

Ok, this is a bit closer, but I'm still having problems..

@@ -772,4 +772,12 @@ switch ($actionID) {
              $headers['Reply-to'] = $replyto;
          }
+
 if ($prefs->getValue('expand_on_send')) {
+
     $expanded = Horde::getFormData('to_list');
+
     if (empty($expanded)) {
+
	 expandAllAddresses();
+
	 Horde::raiseMessage(_("Please select \"Send Message\" again to continue."),
HORDE_MESSAGE);
+
	 break;
+
     }
+
 }
          if (!empty($f_to)) {
              $f_to = format_addresses($f_to);

Now it can send messages, but only if the addresses could be expanded.  If you
try to send to a fully qualified address (user@example.com), it keeps giving you
the "Please select..." message w/o actually letting you send.

That particular diff is against 3.1's compose.php.  I've also been working on a
version against HEAD, but I'm not as far along as I am w/3.1.  Doing this in
HEAD screws up the routines that generate the message headers such that two of
the three site headers I've added in config/header.txt get added to the body of
the message, and my log fills with..

    [13-Jun-2002 12:09:13] PHP Warning:  Invalid argument supplied for 
        foreach() in 
        /usr/local/projects/webmail/html-ssl/horde-CVS/imp/lib/Headers.php 
        on line 233

Advice?
Liam