invoke("hook_admin_webmail"); if (($wr=get_variable("webmail_redirect")) && isset($res[$wr]) && $res[$wr]) { $url=$res[$wr]; } else { foreach($res as $r) if ($r!==false) { $url=$r; break; } } if ($url) { header("Location: $url"); } else { header("Location: /nowebmail"); }