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

Re: Mail Recipients


  • Subject: Re: Mail Recipients
  • From: "koenig.yvan" <email@hidden>
  • Date: Sun, 09 Dec 2012 16:58:05 +0100


Le 09/12/2012 à 16:04, Luther Fuller <email@hidden> a écrit :

While trying to fix a problem in a script, yesterday, I encountered a problem (bug?) in Mail.
I noticed that messages copied into the Finder showed a comment like this …

missing value <name@address>

These comments are recent, so I presume that they started appearing after I upgraded to Lion.

I fixed my script to avoid the "missing value" (I just leave that blank), but I can't avoid Mail returning missing value for the name of a recipient. Something seems to be wrong with Mail.

Here is the script I used for testing in Smile …

tell application "Mail"
set selMsgList to selection
set msg to (item 1 of selMsgList)
set recipientList to (to recipients of msg)
set recipientList to recipientList & (cc recipients of msg)
set recipientList to recipientList & (bcc recipients of msg)
--
set recipientText to ""
repeat with i from 1 to (count items of recipientList)
(item i of recipientList)
((name of the result) as Unicode text) & " <" & ((address of the result) as Unicode text) & ">" & return
set recipientText to recipientText & the result
end repeat
end tell
log recipientText & return

I have a message which logs "missing value <email@hidden>",
but the message, when viewed in Mail shows "Fuller X Luther <email@hidden>".
The "X" was added to my Address Book a few minutes ago as a test. (and will soon be removed)
Mail seems to be looking-up names in the Address Book and, perhaps, returning 'missing value' when the look-up fails.

One message logs "missing value <email@hidden>",
but the message displays "Applescript Users <email@hidden>".
Other messages do log recipients correctly, for example:
AS Users List <email@hidden>
applescript Users <email@hidden>
None of these matches my Address Book (which shows "AppleScript Users").

Has anyone seen this? Have any ideas?


Hello

I'm running Mountain Lion and got (with Apple Script Editor)

tell application "Mail"
get selection
--> {message id 130244 of mailbox "forum AppleScript US"}
get every to recipient of message id 130244 of mailbox "forum AppleScript US"
--> {to recipient 1 of message id 130244 of mailbox "forum AppleScript US"}
get every cc recipient of message id 130244 of mailbox "forum AppleScript US"
--> {}
get every bcc recipient of message id 130244 of mailbox "forum AppleScript US"
--> {}
get name of to recipient 1 of message id 130244 of mailbox "forum AppleScript US"
--> missing value
get address of to recipient 1 of message id 130244 of mailbox "forum AppleScript US"
--> "email@hidden"
(*missing value <email@hidden>

*)
end tell


for a message 
from: Porter Slice
object :  Need help calling a script from within a script based on text entry
Date: Thu, 29 Nov 2012 18:23:58 -0800
To: email@hidden

I was a bit surprised because the To: entry doesn't appear when I apply :
Présentation > Message > Toutes les en-têtes (cmd + shift + h).
I get it if I apply :
Présentation > Message > Contenu brut (cmd + option + u)
but for this one (reproduced below), there is no name, only the address so, the behaviour is logical.
To: email@hidden

Yvan KOENIG (VALLAURIS, France) dimanche 9 décembre 2012 16:39:12







 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Mail Recipients (From: Luther Fuller <email@hidden>)

  • Prev by Date: Mail Recipients
  • Next by Date: iTunes 11 - how does it works with pre existing applescripts?
  • Previous by thread: Mail Recipients
  • Next by thread: Re: Mail Recipients
  • Index(es):
    • Date
    • Thread