Hi. This hack looks awesome, and I decided I'd use it to set up IMAP accounts for my moderators. I created profile fields that could only be access from the admincp to hold the username and password, and I was forcing it to use our server for mail. They'd get no permission if I hadn't entered a username and password for them. If they had, all they'd see is the log-in button. (If I get this working I'll probably make it auto-login, but I won't worry about that until later)
Didn't work. I always get the "Unable to login with the information you entered. Please login again." error.
Here's the section of the code I've modified.
PHP Code:
if (!$session_server)
{
$user = $bbuserinfo['field20'];
$host = "tasteslikespam.com";
$pass = $bbuserinfo['field21'];
if ($message) $HTML .= "<font size=-1>$message</font>";
$HTML .= "<form ACTION='email.php?CMD=cookie' METHOD='post'>\n";
$HTML .= "<table cellpadding=0 cellspacing=0 border=0 width=100%><tr><td align=center colspan=2><br><b>vB POP3 / IMAP Email Login Client 1.4 - by Dr. Erwin Loh</b><br><br></td>\n";
$HTML .= "<input TYPE=hidden NAME=username value='$user'>";
$HTML .= "<input TYPE=hidden NAME=host value='$host'>";
$HTML .= "<input TYPE=hidden NAME=pass value='$pass'>";
$HTML .= "<input type='hidden' name='opt' value='IMAP'>";
$HTML .= "<tr><td align=center colspan=2><input type=\"submit\" class=\"button\" name=\"submit\" value=\"Login\" accesskey=\"s\" tabindex=\"3\">";
$HTML .= "</td></tr></table></form><br /><br />";
When I test them same login and server in thunderbird, it works fine.
What did I do wrong? Does it seem like it's just my server?
EDIT: Nevermind, I've got it working.