*This message was transferred with a trial version of CommuniGate(tm) Pro*
I really should remember to clean up my scripts instead of just copying
and pasting. ;-)
It was in there to specifically exclude HTML-type email. It turns out
that if you get the message content of an HTML message via AppleScript
the content is blank. See for yourself with the following AS.
<applescript>
tell application "PowerMail 5.0.2b1"
set theMessages to current messages
repeat with msg in theMessages
set mContent to content of msg as string
display dialog mContent
end repeat
end tell
</applescript>
I found that out after having inadvertently deleted the content of
several messages. Actually most of it was spam anyway. ;-)
Here's a cleaned up version.
<applescript>
--Delete From Content by Andy Fragen <[EMAIL PROTECTED]>
--Modified to use regex from Satimage.osax
--<http://www.satimage.fr/software/en/downloads_osaxen.html>
--Version 1.4
property addedContentRE : {"^/*.*CommuniGate.*$" & return}
tell application "PowerMail 5.0.2b1"
set theMessages to current messages
repeat with msg in theMessages
set mContent to content of msg as string
if mContent = "" then
--display dialog ("\"" & subject of msg & "\" has no
content per
PowerMail.")
return
end if
repeat with i from 1 to the number of items of addedContentRE
try
set (content of msg) to change item i of
addedContentRE in mContent
into "" with regexp
on error
display dialog ("Error stripping added content
from message \"" &
subject of msg & "\"")
end try
end repeat
end repeat
end tell
</applescript>
BTW, the script REQUIRES the Satimage.osax and REQUIRES the exclusion
criteria be valid regex (mostly).
--
Andy Fragen
On Fri, Sep 24, 2004, computer artwork by subhash said:
>[Andy Fragen <[EMAIL PROTECTED]> schrieb am 23.9.2004 um 13:13 Uhr:]
>
>>property excludeHeaders : {"text/html", "multipart/alternative"}
>
>Can you explain the line above?
>What happens to mails with this header values if you would trim them? Can
>they be seen then in a browser? Does PM show the globe icon anymore?
>
>And why you do not trim this values in your script (you commented it)?
>
>Greets
>Subhash
>
>--
>http://www.subhash.at
>
>