*This message was transferred with a trial version of CommuniGate(tm) Pro*
Rick,
I've written the following script to remove all sorts of attachments. I
call it from a filter set as "Always"
<AppleScript>
--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
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
</AppleScript>
Watch for line breaks.
--
Andy Fragen
On Thu, Apr 22, 2004, Rick Lecoat said:
>
>Here's a questions that I've wondered about for ages but never got around
>to asking:
>When HTML messages arrive, I sometimes get a file in the attachments
>folder called "Enclosure.html", sometimes one called "PowerMail HTML
>message.html", and sometimes the HTML message does not create a file at
>all AFAIK.
>
>What determines the different behaviour?
>
>Also, is there any way to avoid having to retain these created files in
>order to read the message later? I keep my email for years, and I hate
>the ideas that in order to be sure of being able to read an HTML message
>received 9 months ago I have to have a vast reservoir of files called
>Enclosure.1.html, Enclosure.2.html, Enclosure.875.html, etc.
>
>Thanks; Rick
>
>--
>G5 2GHz x2 :: 2GB RAM :: 10.3.2 :: PM 5.0b12 :: 3 pane mode
>
>