If you're using lots of domains but don't want to put the domain
drop-down on the homepage, here's some PHP code you could use:
We have for instance for each domain, the subdomain
mail.customers.domain going to the sqwebmail page, like that this works
perfectly.

<td><input type="text" size="16" name="username" value="
<?
ereg("^([a-zA-Z0-9]*)\.([a-zA-Z0-9]*)\.([a-zA-Z]*)$", $SERVER_NAME,
$regs);
if ($regs[2] != "" & $regs[2] != "defaultdomain1" && $regs[2] !=
"defaultdomain2" && $regs[2] != "defaultdomain3") { echo "@" . $regs[2]
. "." . $regs[3]; };
?>
"  maxlength="128"></td>

The first regex exception is for the case where you're entering the IP
address directly, which the filter wouldn't understand an hence display
@.
Defaultdomain1, 2, etc. are the default domains of your system where the
@... part is not needed

Have fun

jmr

Reply via email to