Re: Mail scripting
Re: Mail scripting
- Subject: Re: Mail scripting
- From: John Delacour <email@hidden>
- Date: Tue, 12 Aug 2003 23:17:52 +0100
At 4:24 pm -0300 12/8/03, Marcus Rodrigues wrote:
Trigger an Applescript to do something (This part is easy doable
with a simple rule to be trigered by a "special subject") with the
content of this message. ..
My question:
How do I refer to this message in the script????
This rule will create a text file containing the source and open it
in TextEdit for every message that matches your criteria.
Description: marcus
If [any]
[Message content] [contains] xxxx
[Run Applescript] ////marcus
using terms from app "Mail"
on perform mail action with messages ls
repeat with msg in ls
set {s, i} to {source, message id} of msg
set fu to "/tmp/" & i
set f to POSIX file fu
open for access f with write permission
write s to f
close access f
do shell script "open -e " & quoted form of fu
end
end
end
JD
_______________________________________________
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.