[Tickets #4991] Re: Default identity not selected correctly when replying to or forwarding messages in Inbox

bugs at bugs.horde.org bugs at bugs.horde.org
Fri Mar 16 18:35:03 UTC 2007


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=4991
-----------------------------------------------------------------------
 Ticket             | 4991
 Updated By         | boutilpj at ednet.ns.ca
 Summary            | Default identity not selected correctly when replying to or forwarding
                    | messages in Inbox
 Queue              | IMP
 Version            | 4.1.3
 Type               | Bug
 State              | Feedback
 Priority           | 2. Medium
 Owners             | 
-----------------------------------------------------------------------


boutilpj at ednet.ns.ca (2007-03-16 11:35) wrote:

> First of all, this has to be implemented in getMatchingIdentity(). 
> And there is the possibility that the from_addr is locked, but the 
> user still has two different from addresses. The correct logic would 
> be to not stop when the first matching identity is found, but to find 
> all of them, and then select the default identity or the first one 
> from this list.

>From what I can see once the from_addr pref is locked and the value is ''
, getMatchingIdentity() always just returns one value,
$imp['user']@$imp['maildomain'] . That is because of the getFromAddress
function below, in particular this bit:

$val = $this->getValue('from_addr', $ident);
        if (empty($val)) {
            $val = $imp['user'];
        }

I have tested by creating 4 identities with 4 different from_addr . As
soon as I lock from_addr as false with a value of '' , those from_addr in
horde_prefs are ignored.

 

    function getFromAddress($ident = null)
    {
        global $imp;

        if (!empty($this->_fromList[$ident])) {
            return $this->_fromList[$ident];
        }

        $val = $this->getValue('from_addr', $ident);
        if (empty($val)) {
            $val = $imp['user'];
        }

        if (!strstr($val, '@')) {
            $val .= '@' . $imp['maildomain'];
        }

        $this->_fromList[$ident] = $val;

        return $val;
    }




More information about the bugs mailing list