I've gotten one script to work (has one file attachment) but the second does
not. I don't know if my repeat loop is not correct or the way I'm delimiting
the file attachments, or both. Each email will have 2 or more attachments.



DOESN'T WORK: tell application "Mail" set theSubject to "BS Order" set theBody to "TESTING 123" set theSender to "[EMAIL PROTECTED]" set theName to "ADI" set theAddress to "[EMAIL PROTECTED]" set fileList to <path to file 1> & return & <path to file 2>

set newMessage to make new outgoing message with properties
{subject:theSubject, content:theBody & return & return}
tell newMessage
-- Default is false. Determines whether the compose window will
-- show on the screen or whether it will happen in the background.
set visible to true
set sender to theSender
make new to recipient at end of to recipients with properties
{name:theName, address:theAddress}
tell content
repeat with fileName in fileList
make new attachment with properties {file name:fileName} at
after the last paragraph
end repeat
end tell
end tell


    send newMessage
end tell

The "repeat with" in AppleScript expects an AppleScript list which is in the format:
{"first item", "second item"}


Try this (or some minor variation):
        set fileList to "{" & <path to file 1> & "," & <path to file 2> & "}"

Cheers,
Sarah

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to