Well, it's acutally easy. I did this for my fire department once. Let me see if I can dig-up the code....
I believe I automatically logged them into SquirrelMail.....
Okay, so you set up your form:
mail_login.html
<form name="mailLogin" action="process_webmail_login.php" method="post">
Username: <input type="text" size="20" name="user">@domain.com<br>
Password: <input type="password" size="20" name="pass"><br>
<input name="login" type="submit" value="..:: Login ::..">
</form>
Which posts to a PHP Script:
process_webmail_login.php
<?php
$email = $_POST['user'].'@domain.com';
$pass = $_POST['pass'];
// Now, just submit a hidden form:
$form = '
<form action="http://www.domain.com:2095/3rdparty/squirrelmail/src/login.php" method="post">
<input type="hidden" name="user" value="'.$user.'">
<input type="hidden" name="pass" value="'.$pass.'">
</form>';
?>
<html>
<head>
<title>Logging you in...</title>
<script language="JavaScript">
<!--
function myFormSubmit(){
document.form.submit();
}
-->
</script>
</head>
<body onLoad="myFormSubmit()">
Please wait while we log you into webmail!!
<?php echo $form; ?>
</body>
</html>
That's it!! You're done. You can modify it to use almost any domain, but that shoudl be enough to get you going!!