* 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;
|
||||
}
|
||||
|
||||
fputs ($imap_stream, "a001 LOGIN \"" . addslashes($username) .
|
||||
'" "' . addslashes($password) . "\"\r\n");
|
||||
fputs ($imap_stream, "a001 LOGIN \"" . quoteIMAP($username) .
|
||||
'" "' . quoteIMAP($password) . "\"\r\n");
|
||||
$read = sqimap_read_data ($imap_stream, 'a001', false, $response, $message);
|
||||
|
||||
/** If the connection was not successful, lets see why **/
|
||||
|
|
|
@ -569,5 +569,10 @@
|
|||
|
||||
return $String;
|
||||
}
|
||||
|
||||
function quoteIMAP($str)
|
||||
{
|
||||
return ereg_replace('(["\\])', '\\\\1', $str);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Add table
Reference in a new issue