- $imapConnection = fsockopen($imapServerAddress, 143, &$errorNumber, &$errorString);
- if (!$imapConnection) {
- echo "Error connecting to IMAP Server.<br>";
- echo "$errorNumber : $errorString<br>";
- exit;
- }
- $serverInfo = fgets($imapConnection, 256);
-
- fputs($imapConnection, "1 login $username $key\n");
- $read = fgets($imapConnection, 1024);