• 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...again!!! :-)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail...again!!! :-)


  • Subject: Re: Mail...again!!! :-)
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 28 Dec 2007 22:50:30 -0700

On Dec 28, 2007, at 5:24 PM, m wrote:

Here is the script that I am trying to use to move targeted emails.


set theMsgs to every message of mailbox "Foo" of account "Comcast" whose id is 18198
set theMsg to item 1 of mailbox "Foo"
move theMsg to mailbox "Foo_Duplicates"

Error: Cannot get account "Comcast"
Removing  the account name gives an error "Cannot get mailbox "Foo"

And yes...these mailboxes exist!!

The error message is in error.  Is the account a POP account or an SMTP account?  If it is a POP account, the problem is that POP accounts evidently do not contain mailboxes; only SMTP accounts do.

Mailboxes also belong to message viewers and the application.  But message viewer does not have a message property, although it does have a selected message property.

These work:
tell application "Mail"
mailboxes
end tell

tell application "Mail"
mailbox 1
end tell

tell application "Mail"
mailbox "Applescript"
end tell

tell application "Mail"
tell message viewer 1
selected mailboxes
end tell
end tell

These don't:

tell application "Mail"
tell message viewer 1
mailbox "Applescript"
end tell
end tell

tell application "Mail"
tell message viewer 1
mailbox 1
end tell
end tell

tell application "Mail"
tell message viewer 1
item 1 of selected mailboxes
end tell
end tell

tell application "Mail"
tell message viewer 1
mailboxes
end tell
end tell

Maybe that will give you enough information to solve your problem.

-- 
Social Security Privatization: a solution in search of a problem.

 _______________________________________________
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: Mail...again!!! :-)
      • From: m <email@hidden>
References: 
 >Mail...again!!! :-) (From: m <email@hidden>)

  • Prev by Date: Mail: Create New Message script broken on Leopard
  • Next by Date: Re: Script for Safari open with Script editor
  • Previous by thread: Mail...again!!! :-)
  • Next by thread: Re: Mail...again!!! :-)
  • Index(es):
    • Date
    • Thread