Re: Entourage: make new contact
Re: Entourage: make new contact
- Subject: Re: Entourage: make new contact
- From: Michelle Steiner <email@hidden>
- Date: Fri, 1 Jun 2001 12:50:21 -0700
On 6/1/01 9:46 AM, Paul Berkowitz <email@hidden> wrote:
>
> "default email address" is a reference to which of the existing addresses
>
> within the contact is the default address, but that address has to exist
>
> before it can be referenced.
>
>
Oops, I missed that (didn't check).
I rarely send a script to this list without trying it first; I'd be
sending way too many invalid scripts if I didn't try them. <sigh>
>
All that Michelle says about default email address is true here. It's
>
impressive that you can set email address as a property at birth rather than
>
specifically having to create it as an element of the contact after it
>
exists. You can do the same thing with attachments and recipients of
>
messages, but I'd never tried it with email addresses of contacts. Thanks,
>
Michelle! It only seems to work with one email address, which should be
>
good enough. You can always add more as elements.
Yeah, it appears to be that way with Emailer too.
One of the hardest things I've had to try to script Emailer to do is
create a new message with multiple addresses. Here's an example, taking
addresses from an address group:
tell group groupName
repeat with i from 1 to (count of group members)
tell group member i
set the addressee to the address choice
set the destinationAddress to (the address of the addressee)
set the AdresseesName to (the name of the entry)
end tell
set the recipList to the recipList &
{{address:{address:destinationAddress, display name:AdresseesName},
recipient type:bcc recipient}}
end repeat
end tell
make new outgoing message with properties {subject:MessageSubject,
content:MessageContent, recipient: recipList, sending
account:sendingAccount, scheduled:true}
Note the double braces in the last "set" line. I have no idea why it
requires double braces, but it won't work with single braces.
Also, I found that using nested tell statements makes code a lot easier
to understand at times. Not only did I nest "tell group member" within
"tell group groupname", but the entire thing is, of course, nested with
"tell application "Claris Emailer"" as well.
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------