Could solve the Problem as follows:
This line gets all Mail-Ids from the Mailbox, cause of the flag=SE_UID):
$mailIds = imap_search($imapStream, 'ALL', SE_UID, 'ISO-8859-1');
But imap_fetchbody() wants to have a Mail-Number as default. Mail-Id and Mail-Number differ in most cases, so that imap_fetchbody() failed with the given Mail-Id, beacause this was a different int value as the expected Mail-Number.
Adding the Flag FT_UID in the following line solved the Problem:
imap_fetchbody($imapStream, $mailId, '1', FT_UID);
A typical IMAP newbie mistake? Never mind, I'm happy now :)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…