Re: Mail scripting
Re: Mail scripting
- Subject: Re: Mail scripting
- From: John Delacour <email@hidden>
- Date: Tue, 12 Aug 2003 21:58:11 +0100
At 4:24 pm -0300 12/8/03, Marcus Rodrigues wrote:
Now I'm trying to do the following:
Send an email from my Cel to my iBook;
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????
Once you have saved it, as the first (sic) message in the drafts
mailbox ! The only way to get an absolute reference to the message
is to grab its message id.
tell app "Mail"
set p to {visible:true, subject:"Test"}
set m to make outgoing message with properties p
set to1 to {address:item 1 of (get email addresses of account 1)}
tell m to make to recipient at end of to recipients with properties to1
set p to {name:"junk", content:time string of (current date)}
delete (signatures whose name is name of p)
set _sig to make signature with properties p
set message signature of m to _sig
save m
delete _sig
set m to first message in drafts mailbox
-->message 1 of mailbox "Drafts (talorn)" of application "Mail"
set _id to m's message id
set MESSAGE_REF to first message in drafts mailbox whose message id is _id
get content of MESSAGE_REF
--> "9:45:27 pm"
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.