• 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: Help with retrieving messages from GMail account in Mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with retrieving messages from GMail account in Mail.app


  • Subject: Re: Help with retrieving messages from GMail account in Mail.app
  • From: Matthew Smith <email@hidden>
  • Date: Sun, 03 Jul 2011 14:54:29 +1000

There's a major problem in your logic there. Each time you will be processing through all messages in [Gmail]/All Mail. If on one run you are looping through x messages the next time you will be looping through x messages you don't want to do anything to and then y messages you do want to do something to. The time after that you will be looping through x + y messages you won't be doing anything to and z messages you do want to do something to, and so on. Your script is going to take longer and longer each time it runs if you could get it to work.

Could you not just loop through messages in the inbox and move them to a folder instead of copying them? Of perhaps forward them to a non-gmail account and process/delete them from there.

Matthew Smith

On 03/07/2011, at 14:40 , John Kane wrote:

> Sorry, I am not intentionally being obtuse; let me attempt to state the use case again:
>
> * Start the script
> * Read a file, say lastRan, looking for the last time the script ran, and set that as lastRunDateAndTime
> * Loop through all messages in [Gmail]/All Mail folder
>   * If the message has a sent date greater than or equal to lastRunDateAndTime, copy the message into a specified destination folder
> * After all messages in [Gmail]/All Mail folder have been processed, write the current Date and Time Stamp into the file lastRan
> * Terminate the script
>
> I have other stuff that will process the destination folder later, that part works like a champ
>
> Mail.app might not be the correct solution for this, I am currently re-investigating fetchmail and something newer (to me) offlineimap; The latter shows some promise; I can probably do all of this from the UNIX realm

 _______________________________________________
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: Help with retrieving messages from GMail account in Mail.app
      • From: John Kane <email@hidden>
References: 
 >Re: Help with retrieving messages from GMail account in Mail.app (From: John Kane <email@hidden>)
 >Re: Help with retrieving messages from GMail account in Mail.app (From: Joel Esler <email@hidden>)
 >Re: Help with retrieving messages from GMail account in Mail.app (From: Luther Fuller <email@hidden>)
 >Re: Help with retrieving messages from GMail account in Mail.app (From: John Kane <email@hidden>)
 >Re: Help with retrieving messages from GMail account in Mail.app (From: Joel Esler <email@hidden>)
 >Re: Help with retrieving messages from GMail account in Mail.app (From: John Kane <email@hidden>)
 >Re: Help with retrieving messages from GMail account in Mail.app (From: Christopher Stone <email@hidden>)
 >Re: Help with retrieving messages from GMail account in Mail.app (From: John Kane <email@hidden>)

  • Prev by Date: Re: Help with retrieving messages from GMail account in Mail.app
  • Next by Date: Re: Help with retrieving messages from GMail account in Mail.app
  • Previous by thread: Re: Help with retrieving messages from GMail account in Mail.app
  • Next by thread: Re: Help with retrieving messages from GMail account in Mail.app
  • Index(es):
    • Date
    • Thread