Scripting Emailer
Scripting Emailer
- Subject: Scripting Emailer
- From: Michelle Steiner <email@hidden>
- Date: Fri, 2 Feb 2001 21:15:26 -0800
A friend of mine writes a column for the Bay Area Reporter, and emails a
copy of it to her friends and relatives. She asked me to help automate
this for her, and this is what I came up with. (It requires Claris
Emailer 2.0v3, which is the email program she uses.)
--Michelle
set the groupName to "put group name here"
set the sendingAccount to "put account here"
set the MessageSubject to "put subject here"
(*
The above lines need to be changed to use a real group and email account
in your version of emailer. Of course, the subject should be changed to
a real subject.
You may want to insert the code to let you enter any of the above data
through a dialog if they change frequently; this will save the problem
of having to edit the script each time the data changes.
*)
set the MessageFile to choose file with prompt ,
"Choose the message content." of type {"TEXT"}
open for access the MessageFile without write permission
set the MessageContent to read the MessageFile
close access the MessageFile
set the recipList to {}
tell application "Claris Emailer"
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}
end tell
----------------------------------------------------------------------
| Michelle Steiner | Hard as it may be to believe, my |
| email@hidden | life has been based on a true story. |
----------------------------------------------------------------------