• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Scripting Mail (attempt)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: Scripting Mail (attempt)
      • From: John Delacour <email@hidden>
  • Prev by Date: Re: scope property, parent, load script
  • Next by Date: Re: Services Menu (was ...)
  • Previous by thread: transfer message from Mail to FileMaker - no returns in message
  • Next by thread: Re: Scripting Mail (attempt)
  • Index(es):
    • Date
    • Thread