Roundcube Community Forum

 

Automatic domain name in username_domain

Started by davidvanlionhead, May 04, 2010, 08:54:57 AM

Previous topic - Next topic

davidvanlionhead

I have altered main.inc.php to support automatic username_domain based on the HTTP_HOST:

if (preg_match("/cube\.(.+\.[a-z]+)/i",$_SERVER["HTTP_HOST"],$m)) {
   $rcmail_config['username_domain'] = $m[1];
}

This translates cube.mydomain.com to mydomain.com as the username_domain. The user only has to fill in the part before the '@' sign. This works automaticilly for all domains of the form 'cube.'

Just a quick fix.

zhylninc

$hostStr = $_SERVER['HTTP_HOST'];
$wPos = strPos($hostStr, '.')+1;
$rcmail_config['username_domain'] = substr($hostStr,$wPos);
this?

Hosana

According to my opinion you can get the Domain name here  at cheap cost by getting account in this site http://www.goresellers.com/  as a reseller ..
My friend got reseller account in this site & she got hosting services at cheap cost & got fine solution ..

Hosana

According to my opinion you can get the Domain name here  at cheap cost by getting account in this site http://www.goresellers.com/  as a reseller ..
My friend got reseller account in this site & she got hosting services at cheap cost & got fine solution ..