From: Michael M Slusarz Date: Fri, 5 Feb 2010 20:09:32 +0000 (-0700) Subject: Use personal info of from address if reply-to address is missing it X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=6e6051abb0625dd9250a00f585a9d65d9765ce68;p=horde.git Use personal info of from address if reply-to address is missing it --- diff --git a/imp/lib/Compose.php b/imp/lib/Compose.php index 864b23e43..85e1f2152 100644 --- a/imp/lib/Compose.php +++ b/imp/lib/Compose.php @@ -1389,7 +1389,17 @@ class IMP_Compose * doesn't have a post address but does have a * reply-to address. */ if ($val == 'reply-to') { - $header['to'] = $addr_obs[0]['address']; + /* If reply-to doesn't have personal + * information, check from address. */ + if (!$addr_obs[0]['personal'] && + ($to_ob = $h->getOb('from')) && + $to_ob[0]['personal'] && + ($to_addr = Horde_Mime_Address::addrArray2String($to_ob)) && + Horde_Mime_Address::bareAddress($to_addr) == $addr_obs[0]['address']) { + $header['to'] = $to_addr; + } else { + $header['to'] = $addr_obs[0]['address']; + } } else { $cc_addrs = array_merge($cc_addrs, $addr_obs); }