Re: Mail.app (Sendername/Senderaddress)
Re: Mail.app (Sendername/Senderaddress)
- Subject: Re: Mail.app (Sendername/Senderaddress)
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 16 Sep 2002 17:56:30 -0700
Might I draw your attention to the documented (Apple) Mail Suite, as used
for many years by Claris Emailer, Outlook Express and Entourage?
Class message: An e-mail message
Plural form:
messages
Elements:
attachment by numeric index, satisfying a test
recipient by numeric index, satisfying a test
part by numeric index, satisfying a test
Properties:
--
sender address -- sender of the message
Class address: An e-mail message address
Plural form:
addresses
Properties:
display name Unicode text -- the name used for display
address string -- the e-mail address
(Well, Unicode text is newer.) Of course this is the notorious class
('address', a record) which has another sort of 'address (a string) as one
of its own properties! So maybe that's why you dropped it (although I
suspect that would be a rather generous explanation). It managed to cover
all the bases, however. All you had to do was call one of them 'email
address' and leave the other at 'address'.
Are you aware that in OE and Entourage, although sender (i.e. address) is of
the format {address:"email@hidden", display name:"Joe Blow"} you can actually
make a recipient in the format
recipient:"Joe Blow <email@hidden>"
as long as you don't mind it being a To recipient. (Otherwise you have to
spell it out the long way.) That gets the best of both worlds, since you can
sill get display name and address separately. Ah, yes, recipient itself has
a 'recipient type' property as well as an address property, which is very
convenient. Quite sensible of the Apple engineers who first invented the
Mail suite, and now missing from Mail with its separate 'to recipient',
'bcc recipient' and so on elements. In fact, 'recipient' doesn't even appear
to have 'to recipient', 'cc recipient' etc. as sub-classes, although they
all have the same properties. (Is that just an error in the dictionary? It
doesn't look like it.) At least 'account' has 'pop account' and 'imap
account' as subclasses.
Is there any particular reason why some of these good definitions (like
'recipient' with 'recipient type' property) were thrown out? There's even
something called 'Mail Suite' in the dictionary, with a few remnants. So it
must have been somewhat intentional.
--
Paul Berkowitz
>
From: cricket <email@hidden>
>
Date: Mon, 16 Sep 2002 16:07:14 -0700
>
To: "Manfred M. Strasser" <email@hidden>
>
Cc: ML AppleScript-User <email@hidden>
>
Subject: Re: Mail.app (Sendername/Senderaddress)
>
>
Right now, sender returns a string value. We're looking at making this
>
more flexible in the future.
>
>
- cricket
>
>
On Saturday, August 31, 2002, at 02:31 AM, Manfred M. Strasser wrote:
>
>
>> tell application "Mail"
>
>> set theSelection to selection
>
>> set theMessage to item 1 of theSelection
>
>> get sender of theMessage
>
>> end tell
>
>
>
> right, right, right ... But I want to get "the name of the sender" and
>
> "the emailadress of the sender" isolated.
>
>
>
> As I was using Entourage this was possible ...
>
> set theSenderAddress to (address of sender of theMessage)
>
> set theSenderName to (display name of sender of theMessage)
>
_______________________________________________
>
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.
_______________________________________________
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.