• 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: Recycling Email Drafts in Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recycling Email Drafts in Mail


  • Subject: Re: Recycling Email Drafts in Mail
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 27 Mar 2009 11:35:43 -0700

On Mar 27, 2009, at 10:59 AM, Bill Briggs wrote:

I made a script to duplicate the message in the drafts folder, and it compiles and runs without error, but guess what, nothing happens. When I change it's object hierarchy to actually match the dictionary, it fails.

Ed Stockley's script works, but I suggest using the account's name rather than index.


Here is a variation for having multiple documents in the Draft's folder

tell application "Mail"
set myAccount to first item of (choose from list (get name of accounts))
tell account myAccount
set myMailbox to mailbox "Drafts"
tell myMailbox
try
set mySubject to first item of (choose from list (get subject of messages))
set myMessage to message 1 whose subject is mySubject
end tell
duplicate myMessage to myMailbox
open last message of myMailbox
end tell
end tell


There would have to be a check for no messages in the selected account, but I'll leave that as an exercise for the student, as they say in the classroom. <g>

-- Michelle

--
If Liberals hated America, they'd vote Republican.


_______________________________________________ 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: Recycling Email Drafts in Mail
      • From: James Cook <email@hidden>
References: 
 >Recycling Email Drafts in Mail (From: James Cook <email@hidden>)
 >Re: Recycling Email Drafts in Mail (From: Bill Briggs <email@hidden>)
 >Re: Recycling Email Drafts in Mail (From: Michelle Steiner <email@hidden>)
 >Re: Recycling Email Drafts in Mail (From: Luther Fuller <email@hidden>)
 >Re: Recycling Email Drafts in Mail (From: Luther Fuller <email@hidden>)
 >Re: Recycling Email Drafts in Mail (From: Bill Briggs <email@hidden>)

  • Prev by Date: Re: Recycling Email Drafts in Mail
  • Next by Date: Re: Recycling Email Drafts in Mail
  • Previous by thread: Re: Recycling Email Drafts in Mail
  • Next by thread: Re: Recycling Email Drafts in Mail
  • Index(es):
    • Date
    • Thread