- $endline = fgets($imap_stream, 1024);
- $read = strtolower($read);
+ $response = substr($read, 0, 4);
+ while ($response != "a001") {
+ $bodystructure = $read;
+ $read = fgets ($imap_stream, 10000);
+ $response = substr($read, 0, 4);
+ }
+ $read = strtolower($bodystructure);