Hello all,
I’m trying to create a script that searches in a certain folder for any file of type JPEG i want to set this file as an attachment in application mail. If many of these files are found i want to set each picture a separate attachment in application mail.
this is what i came up with till now and it’s working…
tell application "Mail"
set theSubject to "this is a smaple subject"
set theBody to "this is a sample body.."
set theAttachment to "psychoed HD:testfolder:"
set newMessage to make new outgoing message with properties {subject:theSubject, content:theBody & return & return}
tell newMessage
set visible to true
make new to recipient at end of to recipients with properties {name:"", address:""}
tell content
make new attachment with properties {file name:theAttachment} at after the last paragraph
end tell
end tell
activate
end tell
now all i need to do is check the testfolder for jpegs, and attach them each seperatly by using the same command but in some sort of a loop.
i need help urgently, I’m new with these stuff…
Any help would be greatly appreciated,
Thanks,
Psycho-ed