• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to create multiple addresses in a mail.app message without looping?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Folders are multiplying like rabbits...
  • Next by Date: Re: Count and rename files
  • Previous by thread: Folders are multiplying like rabbits...
  • Next by thread: Re: 8-bit on mailing list (was Re: Wierd error)
  • Index(es):
    • Date
    • Thread