if ($forward_id)
$id = $forward_id;
- else if ($reply_id)
+ elseif ($reply_id)
$id = $reply_id;
// Write Attachment to file
$fp = fopen ($attachment_dir.$localfilename, "w");
fputs ($fp, decodeBody(mime_fetch_body($imapConnection, $forward_id, $message->header->entity_id), $message->header->encoding));
- fgets($imapConnection, 256);
- fgets($imapConnection, 256);
- fclose ($fp);
+
+// Don't know why these lines were included
+// fgets($imapConnection, 256);
+// fgets($imapConnection, 256);
+ fclose ($fp);
+
$attachments[$localfilename] = $filename;
}