Re: Adding a message to a mailbox in Mail
Re: Adding a message to a mailbox in Mail
- Subject: Re: Adding a message to a mailbox in Mail
- From: Thierry Faucounau <email@hidden>
- Date: Sat, 28 Sep 2002 22:35:59 +0200
Thanks for the suggestions,
I had tried the mailbox as a property with no luck. I get an
NSArgumentsWrongScriptError although mailbox is not marked r/o and is a
property of message.
make new message with properties {subject:"test", contents:"this is a
test"} at end of mailbox (mailbox "test")
Gives me an NSContainerSpecifier error so I tried:
set theMBOX to mailbox "test"
make new message with properties {subject:"test", contents:"this is a
test"} at end of theMBOX
Which brought back the familiar NSInternalScriptError.
Does anyone know if this is possible with Mail, it seems Eudora and OE
can add mail messages using AppleScript, why can't the built-in mailer?
Thierry
On Saturday, September 28, 2002, at 04:26 PM, Rob Jorgensen wrote:
On 9/28/02, Thierry Faucounau commented:
Hi,
I have searched the web and archives and still can not find a way to
add a message programatically to a mailbox using applescript.
I would have thought something like this would work:
tell application "Mail" to make new message in mailbox (mailbox
"test") with properties {subject:"test subject", contents:"test
contents"}
but I get:
make new message with properties {subject:"test", contents:"this is a
test"} at mailbox (mailbox "test")
--> Mail got an error: NSInternalScriptError
In the Script Editor Event Log.
I have tried countless variations (including ones that throw no
errors but create no messages).
What am I missing?
What happens if you use this?
make new message with properties {subject:"test", contents:"this is a
test"} at end of mailbox (mailbox "test")
I don't use Mail but, if recall correctly, mailbox is a property of a
message. Maybe this would work (untested and uncompiled):
make new message with properties {subject:"test", contents:"this is a
test", mailbox:"test"}
--
Rob Jorgensen
Ohio, USA
_______________________________________________
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.
_______________________________________________
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.