Title: Re: Junk email folder
On 5/18/04 1:39 AM, "Scott Haneda" <[EMAIL PROTECTED]> wrote:
> What I was loking for was if to postmaster, move and DO NOY FORWARD else
> move and FORWARD.
>
> Would this do that?
>
> tell application "Microsoft Entourage"
> set msgList to current messages
> repeat with oneMsg in msgList
> if address of address of (first recipient of oneMsg) starts with
> "postmaster@" then
> move oneMsg to folder id 6
> else
> set theFwd to forward oneMsg to "[EMAIL PROTECTED]" without
> opening window
> send theFwd with sending later
> move oneMsg to folder id 6
> end if
>
> end repeat
> end tell
Yes, but this is neater (and please stop changing my HTML messages to plaintext. I send them in HTML so that the long lines won't break, which makes them unable to compile in Script Editor):
tell application "Microsoft Entourage"
set msgList to current messages
repeat with oneMsg in msgList
if address of address of (first recipient of oneMsg) does not start with "postmaster@" then
set theFwd to forward oneMsg to "[EMAIL PROTECTED]" without opening window
send theFwd with sending later
end if
move oneMsg to folder id 6
end repeat
end tell
>
> Is AS case insensitive, or should I do something like:
> lowercase(first recipient)
AS is case-insensitive except in very special cases not applicable here. There's no need to lowercase it, which in AppleScript can't be done easily like that without a scripting addition. Well-spotted, but it's OK as it is.
--
Paul Berkowitz
MVP Entourage
Entourage FAQ Page: <http://www.entourage.mvps.org/toc.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>
PLEASE always state which version of Entourage you are using - **2004**, X or 2001. It's often impossible to answer your questions otherwise.
- Junk email folder Scott Haneda
- Re: Junk email folder Paul Berkowitz
- Re: Junk email folder Scott Haneda
- Re: Junk email folder Paul Berkowitz
- Re: Junk email folder Scott Haneda
- Re: Junk email folder Paul Berkowitz
- Re: Junk email folder Scott Haneda
- Re: Junk email folder Peter C.S. Adams
- Re: Junk email folder Scott Haneda
- Re: Junk email folder Paul Berkowitz
- Re: Junk email folder Scott Haneda
- Re: Junk email folder Paul Berkowitz
- Re: Junk email folder Graham
