Re: Outlook Express: deleting HTML
Re: Outlook Express: deleting HTML
- Subject: Re: Outlook Express: deleting HTML
- From: Kai Edwards <email@hidden>
- Date: Sat, 16 Feb 2002 22:49:27 +0000
on 10 Feb 2002 19:24:12 -0800, Paul Berkowitz <email@hidden> wrote:
>
On 2/10/02 5:07 PM, "Gnarlodious" <email@hidden> wrote:
>
>
> I'm trying to use a script to delete OE HTML fermatted e-mail, since it
>
> doesn't have that choice in the Rules.
>
>
>
> Has anyone figured this out, cause this is not working:
>
>
>
> tell application "Outlook Express"
>
> if has html of current messages is true then
>
> --delete the sucker
>
> end if
>
> end tell
>
>
>
> The plan is to run a script from the Rules as the messages come in.
(snip - some enlightening stuff about OE Rules, evaluations, etc.)
>
But why not do this instead:
>
>
tell application "Outlook Express"
>
set theMessage to item 1 of (get current messages)
>
if has html of theMessage then
>
set content of theMessage to (get content of theMessage)
>
end if
>
end tell
>
>
Getting 'content of theMessage' converts it to plain text! - it's just a
>
string then. (It pays to remember that if you ever want to preserve HTML.)
Neat!
I'd just managed to figure out how to get Rachel's script working when I
came across your reply.
At the time, my interest in such a script was purely academic. (I suppose
I'm a little too curious to delete unread messages - even if HTML formatted
mail can be infuriating at times.)
Converting HTML messages to plain text by getting 'content of theMessage'
seems like the ideal solution for me - so I'll be using a Rule incorporating
a similar script [1] from now on!
Many thanks.
Kai
[1] FWIW, and mindful of your caution in parens,
I'm currently filtering unknown senders with:
----------------------------------------------------
if has html of theMessage then
if name of sender of theMessage is not in name of contacts then
set content of theMessage to (get content of theMessage)
end if
end if
----------------------------------------------------
--
**********************************
Kai Edwards Creative Resources
1 Compton Avenue Brighton UK
Telephone +44 (0)1273 326810
**********************************
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.