D
Doug
Hi,
Using: OS 10.3.3, Office X (latest rev), IMAP mail account
I'm trying to write a simple script that would allow me to select a range of
messages in an IMAP inbox, then permanently delete them. If I use the
command:
delete messagesToBeDeleted
The messages are simply moved to the deleted folder, when what I really want
is for them to be permanently deleted, i.e. gone from the deleted folder and
the IMAP server.
So, next idea. Just execute that same delete command twice...which doesn't
work. Apparently, when the messages are moved from the inbox to the deleted
folder, the message IDs are changed. It further appears that message IDs are
reused in a not easily predictable way (by me , so the moved messages
won't be first or last in the deleted messages list, nor will they have the
highest or lowest message IDs.
So, next idea. Trying:
set connection action of SelectedMessage to remove at next connection
I haven't gotten this to do anything.
So, next idea. Mark all of these moved messages as untouched before I move
them to the deleted folder, then iterate through the deleted folder looking
for (and deleting) untouched mail. This works, but given that I like to
leave my non-Spam email in my deleted folder for a few months, I have way
too many messages to iterate through (perhaps 2,000) and this method is much
slower than just manually going to a custom view that has the filter I want,
selecting all and deleting.
....which brings me to the last thing I tried. Which is to use the trick I
described above (mark relevant messages-to-be-deleted as unread), then (with
Applescript) opening a custom view window on the relevant messages. This all
works as I would expect, but apparently, there is no way to get at the
message list content of a custom view window through Applescript.
So...I'm sure the answer is something like:
delete messagesToBeDeleted REALLY
....but I'm out of ideas. Any advice greatly appreciated.
Doug
Using: OS 10.3.3, Office X (latest rev), IMAP mail account
I'm trying to write a simple script that would allow me to select a range of
messages in an IMAP inbox, then permanently delete them. If I use the
command:
delete messagesToBeDeleted
The messages are simply moved to the deleted folder, when what I really want
is for them to be permanently deleted, i.e. gone from the deleted folder and
the IMAP server.
So, next idea. Just execute that same delete command twice...which doesn't
work. Apparently, when the messages are moved from the inbox to the deleted
folder, the message IDs are changed. It further appears that message IDs are
reused in a not easily predictable way (by me , so the moved messages
won't be first or last in the deleted messages list, nor will they have the
highest or lowest message IDs.
So, next idea. Trying:
set connection action of SelectedMessage to remove at next connection
I haven't gotten this to do anything.
So, next idea. Mark all of these moved messages as untouched before I move
them to the deleted folder, then iterate through the deleted folder looking
for (and deleting) untouched mail. This works, but given that I like to
leave my non-Spam email in my deleted folder for a few months, I have way
too many messages to iterate through (perhaps 2,000) and this method is much
slower than just manually going to a custom view that has the filter I want,
selecting all and deleting.
....which brings me to the last thing I tried. Which is to use the trick I
described above (mark relevant messages-to-be-deleted as unread), then (with
Applescript) opening a custom view window on the relevant messages. This all
works as I would expect, but apparently, there is no way to get at the
message list content of a custom view window through Applescript.
So...I'm sure the answer is something like:
delete messagesToBeDeleted REALLY
....but I'm out of ideas. Any advice greatly appreciated.
Doug