public function getFromAddress($ident = null)
{
if (is_null($ident)) {
$ident = $this->getDefault();
}
if (!isset($this->_cached['from'][$ident])) {
$val = $this->getValue($this->_prefnames['from_addr'], $ident);
if (!strlen($val)) {
$val = $GLOBALS['registry']->getAuth();
}
if (!strstr($val, '@')) {
$val .= '@' . $GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create()->config->maildomain;
}
$ob = new Horde_Mail_Rfc822_Address($val);
if (is_null($ob->personal)) {
$ob->personal = $this->getFullname($ident);
}
$this->_cached['from'][$ident] = $ob;
}
return $this->_cached['from'][$ident];
}