Scripting Mail
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