
- Code: Select all
set theAttachment1 to (POSIX path of theFile)
set subject_ to "SUBJECT"
set the_content to "CONTENT"
tell application "Mail"
set newMessage to make new outgoing message with properties {subject:subject_, content:the_content & return & return}
tell newMessage
set visible to false
set sender to "my1@mac.com"
make new to recipient at end of to recipients with properties {address:"my1@mac.com"}
make new attachment with properties {file name:theAttachment1} at after the last paragraph
(* change save to send to send*)
send --<<<<---------------- change save to send to send or send to save to save to drafts
(* change save to send to send*)
end tell
end tell
It seems to work well with the exception if it is more than one file it will send one email for each file. If i update 20 files, i don't want the system to send out 20 different email messages for one update. Anyone have any idea how i can fix this? Thanks