Ben buradan IMAP kullanarak bir dizine ekleri indirmek için çevrimiçi PHP kodu bulundu. http://www.nerdydork.com/download-pop3imap-email-attachments-with-php.html
Ben bunu biraz değiştirerek modifiye
$structure = imap_fetchstructure($mbox, $jk);
$parts = ($structure->parts);
karşı
$structure = imap_fetchstructure($mbox, $jk);
$parts = ($structure);
karşı get it karşı run properly, as otherwise I got an error about how stdClass doesn't define a property called $parts. Doing that, I was able karşı download all the attachments. I tested it again recently though, and it didn't work. Well, it didn't work 6 times, worked the 7th, and then hasn't worked since. I'm thinking it has something karşı do with me screwing up the parts handling, since count($parts) keeps returning 1 for each message, so it's not finding any attachments I think.
Hiçbir sorunları ile bir noktada ekleri indirilen beri, ben alan şeyler doğru burada berbat alıyorsanız emin hissediyorum. Bu kod bloğu bir kutu içinde her iletide geçer döngü için önce, ve sadece her imap yapı için $ parça geçer döngü sonra. Eğer sağlayabilir herhangi bir yardım için teşekkür ederiz. Ben php.net üzerinde imap_fetchstructure sayfasına baktı ve ben ne yapıyorum yanlış anlamaya olamaz.
Edit: I just double-checked the folder after typing up my question and it all popped up. I feel like I'm going nuts. I hadn't run the code since a few minutes before I started typing this, and it doesn't make sense karşı me that it would take this long karşı trigger. I have some 800 messages in the mailbox, but I figured since it printed my statement at the very end of the PHP that all of the file creation work was done.