Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Variable for multiple recipients in Mail



I have a script that automatically attaches an FTP link to an email and uses
the name of the file to determine who should get the email.

My challenge is I want to have one creation step with the variables changing
depending on the receiving location. I could use variables to set the name
and address but each location gets different number of recipients so that
doesn't work.

I have created a variable that consists of a string that mimics the hard
coded. Here is the hard code.


Tell new message
Set content of it to the_body
Make new to recipient at end with properties {name: "Jane Doe", address:
"email@hidden"}
Make new to recipent at end with properties {name: "John Roe", address:
"email@hidden"}

End tell


 so I did 

Set myRecips to "Make new to recipient at end with properties {name: \"Jane
Doe\", address: \"email@hidden\"}
Make new to recipent at end with properties {name: \"John Roe\", address:
\"email@hidden\"}"

Then tried 
Tell new message
Set content of it to the_body

myRecips

End tell
-----
The variable matches the command but I guess I need some kind of statement
or  such that says treat this string as a line of code and I can't find a
way to do it

Any suggestions. 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.