* Got rid of problem with passwords (finally)
* Added a new function in strings.php to quote a string to be sent to the IMAP server
This commit is contained in:
parent
ec81d1d757
commit
1b97851467
2 changed files with 7 additions and 2 deletions
|
@ -128,8 +128,8 @@
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
fputs ($imap_stream, "a001 LOGIN \"" . addslashes($username) .
|
fputs ($imap_stream, "a001 LOGIN \"" . quoteIMAP($username) .
|
||||||
'" "' . addslashes($password) . "\"\r\n");
|
'" "' . quoteIMAP($password) . "\"\r\n");
|
||||||
$read = sqimap_read_data ($imap_stream, 'a001', false, $response, $message);
|
$read = sqimap_read_data ($imap_stream, 'a001', false, $response, $message);
|
||||||
|
|
||||||
/** If the connection was not successful, lets see why **/
|
/** If the connection was not successful, lets see why **/
|
||||||
|
|
|
@ -570,4 +570,9 @@
|
||||||
return $String;
|
return $String;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function quoteIMAP($str)
|
||||||
|
{
|
||||||
|
return ereg_replace('(["\\])', '\\\\1', $str);
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Reference in a new issue