• 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
Re: Composing a Mail.app message programatically from another application using Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Composing a Mail.app message programatically from another application using Applescript


  • Subject: Re: Composing a Mail.app message programatically from another application using Applescript
  • From: Marco Binder <email@hidden>
  • Date: Sat, 29 Mar 2003 15:11:58 +0100

Hi gerben,

this is the Cocoa-Dev list, not the AppleScript list. You might want to
ask such kind of questions on that list instead. Still, this script
should work...

tell application "Mail"
set bodyvar to "put body text here" as international text
set recipientName to "Recipient Name" as international text
set recipientAddress to "email@hidden"
set subjectvar to "subject" as international text
make new outgoing message
set mess to the result
set sender of mess to "Your name <email@hidden>"
set subject of mess to subjectvar
set content of mess to bodyvar
set message signature of mess to signature "signature name" of
application "Mail"
tell mess to make new to recipient at end of to recipients with
properties {name:recipientName, address:recipientAddress}
set visible of mess to true
end tell


Have fun,

Marco


--
|\ /| E-Mail: email@hidden WWW: www.marco-binder.de
| \/ | Telefon: 07531 / 94 19 94 Fax: 07531 / 94 19 92
| |ARCO Snail-Mail: Banater Str. 3 - 78467 Konstanz
BINDER _____________________________________________________
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: NSMatrix & mouseDragged?
  • Next by Date: Delegate's methods of NSTextFields aren't called
  • Previous by thread: Re: NSMatrix & mouseDragged?
  • Next by thread: Delegate's methods of NSTextFields aren't called
  • Index(es):
    • Date
    • Thread