To help my users report problems easily, I want to create as much of an email as possible. Most importantly, I want to attach a file (the log file).
How can I do this in AppleScript?
To help my users report problems easily, I want to create as much of an email as possible. Most importantly, I want to attach a file (the log file).
How can I do this in AppleScript?
tell application "Mail"
set theMessage to make new outgoing message with properties {visible:true, subject:"My Subject", content:"My Body"}
tell theMessage
make new to recipient at end of to recipients with properties {name:"Ben Waldie", address:"[email protected]"}
end tell
tell content of theMessage
make new attachment with properties {file name:pathToFile} at after last paragraph
end tell
end tell