roundcubemail/program/lib/Roundcube/rcube_config.php
public function mail_domain($host, $encode=true)
    {
        $domain = $host;

        if (is_array($this->prop['mail_domain'])) {
            if (isset($this->prop['mail_domain'][$host])) {
                $domain = $this->prop['mail_domain'][$host];
            }
        }
        else if (!empty($this->prop['mail_domain'])) {
            $domain = rcube_utils::parse_host($this->prop['mail_domain']);
        }

        if ($encode) {
            $domain = rcube_utils::idn_to_ascii($domain);
        }

        return $domain;
    }
public function mail_domain($host, $encode=true)
    {
        $domain = $host;

        if (is_array($this->prop['mail_domain'])) {
            if (isset($this->prop['mail_domain'][$host])) {
                $domain = $this->prop['mail_domain'][$host];
            }
        }
        else if (!empty($this->prop['mail_domain'])) {
            $domain = rcube_utils::parse_host($this->prop['mail_domain']);
        }

        if ($encode) {
            $domain = rcube_utils::idn_to_ascii($domain);
        }

        return $domain;
    }
public function mail_domain ( $ host , $ encode = true ) { $ domain = $ host ; if ( is_array ( $ this -> prop [ 'mail_domain' ] ) ) { if ( isset ( $ this -> prop [ 'mail_domain' ] [ $ host ] ) ) { $ domain = $ this -> prop [ 'mail_domain' ] [ $ host ] ; } } else if ( ! empty ( $ this -> prop [ 'mail_domain' ] ) ) { $ domain = rcube_utils :: parse_host ( $ this -> prop [ 'mail_domain' ] ) ; } if ( $ encode ) { $ domain = rcube_utils :: idn_to_ascii ( $ domain ) ; } return $ domain ; }
Return the mail domain configured for the given host

@param string  $host   IMAP host
@param boolean $encode If true, domain name will be converted to IDN ASCII

@return string Resolved SMTP host
Return the mail domain configured for the given host