How to create multiple addresses in a mail.app message without looping?
How to create multiple addresses in a mail.app message without looping?
- Subject: How to create multiple addresses in a mail.app message without looping?
- From: Michelle Steiner <email@hidden>
- Date: Wed, 24 Sep 2003 12:25:19 -0700
This script works. I'm trying to figure out how, if possible, to set
the addresses in one chunk, like with a list, without the repeat loop.
It was possible in Claris eMailer, but is it possible with mail.app
--Michelle
set theSubject to "Important news about the Do Not Call list"
set theFile to choose file with prompt "Choose the file containing the
text of the message." of type {"txt"}
set theBody to read theFile
set the addresslist to choose file with prompt "Choose the file
containing the addressees." of type {"txt"}
set theSender to "email@hidden"
tell application "Mail"
set newMessage to make new outgoing message with properties
{subject:theSubject, content:theBody & return & return}
tell newMessage
set visible to false
set sender to theSender
set the addresses to the paragraphs of (read the addresslist)
repeat with thisAddress in addresses
make new to recipient at end of to recipients with properties
{address:thisAddress}
end repeat
set visible to true
activate
end tell
end tell
--
The problem with political jokes is that too many of them get elected.
_______________________________________________
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.