Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Caught in loop - Script may fail under certain circumstances' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Caught in loop - Script may fail under certain circumstances
Authored by: hamarkus on Apr 29, '04 02:02:20PM

This is a really useful script, but under certain circumstances you can get caught in a loop. This can happen when you generally leave a copy of your e-mails on your POP-server and only let Mail delete the ones from the server that are moved from your inbox.

The problem is that this does not always works, sometimes Mail does not delete the mails from the server, or deletes them only when they are also removed from the trash or it only deletes mails from server when there new mails to download. I am not really sure, but here is what happened:

I just had an E-mail with such a special attachement, the script moved it into the trash as expected. But it was not deleted from the server. Every time I checked for new mail, it was downloaded again and directly moved the trash, where ever more copies of the mail could be found.

I then emptied the trash, and when I checked for new mail, I saw briefly the line 'Deleting mail' but it also downloaded the mail again. In the end, I had to delete the mail manually from the server. Strangely enough, I had several of such mails and had this behaviour only with one of them.



[ Reply to This | # ]
Try to fix it - failed
Authored by: hamarkus on Apr 30, '04 06:25:00AM
With this script running now running for the second day, my trash was filling up with tons of duplicates of these mails since Mail is not deleting them from the server. Since Mail's settings are 'Remove copy from server after retrieving a message' 'When moved from Inbox', I tried to change the line
 delete eachMessage 
into
 move eachMessage to trash 
but even if invoke the applescript directly, it doesn't do anything, whereas the original script trashes the message. What is wrong with my script? Any help would be highly appreciated.

[ Reply to This | # ]
One step further - but still not there
Authored by: hamarkus on Apr 30, '04 07:50:54AM
o.k. by replacing the line:
 delete eachMessage 
with
 set theAccount to account of mailbox of eachMessage 
 set mailbox of eachMessage to mailbox "Trash" of theAccount 
it now works again, in the sense that it moves the message into the trash, both by invoking the script manually or let the rule do it. But only if I invoke the script manually the message is flagged by Mail as already-downloaded, if I let the rule do the job, the message is downloaded again and again, and each time transfered directly to the trash.

There is probably also a bigger issue with Mail itself, as it seems that none of the Mails I deleted myself manually got deleted on the server.

[ Reply to This | # ]
One step further - but still not there
Authored by: cilly on May 01, '04 04:14:24AM

I am having the same problem. The mail gets downloaded but is not deleted from the POP server, so it gets downloaded and downloaded all the time while my trash is ending up with tons of the same message.

Any help would be apreciated!

---
cilly @ http://www.cilly.dyndns.org/



[ Reply to This | # ]