$read = fgets ($imap_stream, 10000);
$response = substr($read, 0, 4);
$bodystructure = "";
- while ($response != "a001") {
+ while ($response != 'a001' ) && !feof( $imap_stream ) {
$bodystructure .= $read;
$read = fgets ($imap_stream, 10000);
$response = substr($read, 0, 4);
return $regs[1];
}
- $str = "Body retrival error. Please report this bug!\n";
+ $str = "Body retrieval error. Please report this bug!\n";
$str .= "Response: $response\n";
$str .= "Message: $message\n";
$str .= "FETCH line: $topline";