*This message was transferred with a trial version of CommuniGate(tm) Pro*
Here's a more updated version to modify. ;-)
===
--Remove Listed Attachments by Andy Fragen <[EMAIL PROTECTED]>
--v.1.1
property badAttachment : {"winmail.dat", ".exe", "signature.asc",
"IMSTP", "smime.p7s", "PGP.sig"}
property spamAttachment : {".gif", ".jpg", ".jpeg", ".pif", ".scr",
".zip", "Enclosure"}
property spamlabel : 7
tell application "PowerMail 5.0b12"
set theMessages to current messages
repeat with msg in theMessages
if exists (attachments of msg) then
my stripAttachment(badAttachment, msg)
--if (name of storage of msg as string = "Spam") or
(label of msg is
spamlabel) then
if label of msg is spamlabel then
--This added to filters in PowerMail 5
my stripAttachment(spamAttachment, msg)
end if
end if
end repeat
end tell
on stripAttachment(propList, msg)
tell application "PowerMail 5.0b12"
repeat with attach in every attachment of msg
repeat with i from 1 to the number of items of propList
ignoring case
--if (name of attach begins with item i
of propList) or (name of
attach ends with item i of propList) then
if (name of attach contains item i of
propList) then
--display dialog ("Found match:
" & name of attach & ":" & id of msg)
set f to file of attach
tell application "Finder"
try
move f to trash
end try
end tell
end if
end ignoring
end repeat
end repeat
end tell
end stripAttachment
===
--
Andy Fragen
On Fri, Apr 30, 2004, olaf drümmer said:
>Here is a modified version of the original script that moves mails with
>certain attachment to the Spam foolder: