Moving newly created email
Moving newly created email
- Subject: Moving newly created email
- From: Duncan McGregor <email@hidden>
- Date: Tue, 6 May 2008 21:48:03 +0100
I'm trying to create a new email and then move it into a GMail IMAP
folder, on Leopard.
If I try this
tell application "Mail"
set destination to mailbox "tasks" of account "GMail"
set theMessage to make new outgoing message with properties
{visible:false, subject:"subject"}
close theMessage saving yes
move theMessage to destination
end tell
I get the following log:
get mailbox "tasks" of account "GMail"
mailbox "tasks" of account "GMail"
make new outgoing message with properties {visible:false,
subject:"subject"}
outgoing message id 45543760
close outgoing message id 45543760 saving yes
move outgoing message id 45543760 to mailbox "tasks" of account "GMail"
"Mail got an error: NSArgumentsWrongScriptError"
Looking in the archives I see that this wasn't working in 2003, but
was scheduled to be fixed.
So I try this
tell application "Mail"
set destination to mailbox "tasks" of account "GMail"
set theMessage to make new outgoing message with properties
{visible:false, subject:"subject"}
close theMessage saving yes
set mailbox of theMessage to destination
end tell
And get the following log
get mailbox "tasks" of account "GMail"
mailbox "tasks" of account "GMail"
make new outgoing message with properties {visible:false,
subject:"subject"}
outgoing message id 43177712
close outgoing message id 43177712 saving yes
set mailbox of outgoing message id 43177712 to mailbox "tasks" of
account "GMail"
"Mail got an error: Can’t set mailbox of outgoing message id
43177712 to mailbox \"tasks\" of account \"GMail\"."
I get the same errors using a local mailbox. The event logs seem to
suggest that all the objects exist, it just seems to be picking on
me ;-)
I'd be very grateful if anyone has any ideas
Thanks
Duncan McGregor _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden