Re: Recipients in Mail.app
Re: Recipients in Mail.app
- Subject: Re: Recipients in Mail.app
- From: Todd Fernandez <email@hidden>
- Date: Tue, 24 Jun 2003 22:46:48 -0700
On Tuesday, June 24, 2003, at 06:43 PM, Marc K. Myers wrote:
>
John Delacour wrote:
>
> At 5:17 pm -0400 24/6/03, Marc K. Myers wrote:
>
>
>
>> I'm writing a script to generate a message in Mail.app, based on
>
>> Apple's Create New Message.scpt. According to the Event Log
>
>> everything is working fine. I get an entry:
>
>>
>
>> "make new to recipient at end of every to recipient of outgoing
>
>> message id 48555296 with properties {name:"Jane Doe", address:"
>
>> email@hidden"}"
>
>>
>
>> The problem is that the recipient(s) never get into the message.
>
>> The "To:" line is empty!
>
>
>
> Frustrating isn't it! Try this:
>
>
>
> tell application "Mail"
>
> set _message to make outgoing message with properties {visible:true}
>
> tell _message
>
> set r1 to {name:"me", address:"me@home"}
>
> make to recipient at end with properties r1
>
> end
>
> end
>
>
>
> I do hope they've replaced the team that is responsible for this mess.
>
>
I tried your code directly and I tried incorporating it into my
>
script. In both cases I got the same result: no recipients in the
>
message. I know the example script from Apple used to work because I
>
tried it when I got version 1.0 of Mail. Subsequent "improvements"
>
must have disabled the ability to insert to recipients, at least in
>
any logical approach I can think of.
The following script gives me a new message with the To: line properly
filled out with Mail 1.2.5 on Mac OS X 10.2.6:
tell application "Mail"
set new_message to make new outgoing message with properties
{visible:true}
tell new_message
make new to recipient at end of to recipients with properties
{name:"Jane Doe", address:"email@hidden"}
end tell
end tell
Todd
_______________________________________________
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.