Scripting Mail (attempt)
Scripting Mail (attempt)
- Subject: Scripting Mail (attempt)
- From: bezoek <email@hidden>
- Date: Mon, 28 Apr 2003 22:53:48 +0200
Hi,
Scripting Mail is very hard. Google comes in handy, and code snippets
can be found on the web. The Mail-part of the script below worked when
part of a droplet, but when used with one or both of the top two lines
balks at adding the attachment. I tried it using the POSIX path, but to
no avail.
Any pointers?
Bert
set theFilePath to choose file ""
-- set theFilePath to POSIX path of theFilePath
tell application "Mail"
activate
set mysubject to ""
set mybody to "bla"
display dialog theFilePath as string
set mymail to (make new outgoing message at the beginning of outgoing
messages with properties {subject:mysubject, content:mybody})
set visible of mymail to true
tell content
make new attachment with properties {file name:theFilePath} at before
the first character --after the last paragraph
end tell
end tell
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.