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

Re: Account Mail Question


  • Subject: Re: Account Mail Question
  • From: m <email@hidden>
  • Date: Sat, 29 Dec 2007 13:42:31 -0800


On Dec 29, 2007, at 1:25 PM, Luther Fuller wrote:

Messages, message viewers, mail attachments and windows can be referred to with an id number.
Your code ...
every message of mailbox "Inbox" whose id is 20863
looks suspicious because it refers a single message with a unique id.


Here is a snippet of code I wrote a couple of years ago, so perhaps I've forgotten the details about what it does and why, but it might be helpful ...
('msg' is a reference to a message)


tell application "Mail"
set mbox to (mailbox of msg)
set msgName to ((id of msg) as text) & ".emlx" -- needed for file alias
try
account of mbox -- THIS DOES NOT WORK FOR MAC ACCOUNT or USER MAILBOXES
set acnt to the result
set acntDir to (account directory of acnt) -- THIS WORKS !!!!!!!!!
set noAccount to false
on error
set noAccount to true
end try


I don't recall the reason for my comments. No doubt you will rediscover them.



No doubt!!

I guess I would ask you and others who are more knowledgeable than I, if , because every message in the Mail App has a uniqueID ( and I mean the mail ID,not the message-ID), does it not know which account it is in?
I think the first line you saw as suspicious is valid, as it asks for a list, ( in this case the list is a list of 1). Once this list is obtained, by setting each subsequent variable to a more unique property, I was hoping to derive the value I was looking for. I am unfamiliar with "try".
You have probably answered my question...even though I do not realize it..so I apologise if I missed this.


Michael.

_______________________________________________
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
  • Follow-Ups:
    • Re: Account Mail Question
      • From: Luther Fuller <email@hidden>
    • Re: Account Mail Question
      • From: Michelle Steiner <email@hidden>
References: 
 >Account Mail Question (From: m <email@hidden>)
 >Re: Account Mail Question (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Account Mail Question
  • Next by Date: Re: Account Mail Question
  • Previous by thread: Re: Account Mail Question
  • Next by thread: Re: Account Mail Question
  • Index(es):
    • Date
    • Thread