• 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
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripting Mail


  • Subject: Scripting Mail
  • From: Luther Fuller <email@hidden>
  • Date: Tue, 11 Apr 2006 10:15:19 -0500

Here is a short script that ought to work:

tell application "Mail"
    set theMsg to (some message of mailbox "TEST")
    set theRecipient to (some recipient of theMsg)
    set theAddress to address of theRecipient
    tell me to display dialog theAddress as text
    set theName to name of theRecipient --< problem here
    tell me to display dialog theName as text
end tell

If the message has a recipient address, then the first 'display' will show the address, but then the second 'display' always errors with "The variable theName is not defined." indicating that the line 'set theName to ...' is non-functional. But why? According to Mail's dictionary, this line is correct. Since I've never scripted Mail before, I have to ask ...

Is the problem with me or with Mail?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Scripting Mail
      • From: Pat Stanford <email@hidden>
  • Prev by Date: Re: FileMaker 7 and QuickMail 3.5
  • Next by Date: Re: Floating Palette To Launch Compiled Scripts ?
  • Previous by thread: Re: Web proxy settings?
  • Next by thread: Re: Scripting Mail
  • Index(es):
    • Date
    • Thread