Mail App, gMail and automatically deleting trash

I have the Mail App setup for gmail's IMAP configuration. I have set up the client to store both locally and the server for the TRASH folder. gMail automatically deletes trash in 30 days but I am trying to enhance that feature by allowing MAIL to handle this for me. And as you would have guess, I want less than 7 days too.
So I developed a script that when run removes the trash greater than 3 days. But as soon as I do it the TRASH is added back from the server. It seems to work but doesn't stick.
Here is my script if someone is curious:
tell application "Mail"
delete (every message of mailbox "Trash" of account "Google Mail" whose (date received is less than (current date) - 3 * days))
end tell
Maybe there is a better way to do this. I would appreciate any suggestions or solutions that you guys know about.
Thanks in advance.
-Mickey

An SSL cert'd link/download simply confirms the logon/handoff/receipt is passing over a secure connection.
What occurs to your particular packets in transit, point-to-point-to-point is another matter entirely.

Similar Messages

  • HELP!  I deleted a mail.app account and it deleted my inbox!

    I have several pop accounts set to delete from the server on download.  I got a new mail server and made a new account corresponding to one of my old ones.  I didn't want there to be a conflict with the two accounts using the same "from" address, so I deleted the old account in account preferences.
    Mail then promptly deleted my important inbox for that old account, but none of the other messages from that account that had been moved to other folders.
    Is there any way to get the inbox for that account?  I have a back up of my disk but from a couple of months ago.

    There's not one single file to recover, no...  Mail's mailboxes are stored as folders full of .emlx files with cryptic names, so you're extremely unlikely to be able to get much back with a file recovery tool, and it would be a lot of work regardless.
    However, if you have a backup, you should be able to retrieve that mailbox.  Sounds like it's a clone, which means it looks just like your boot drive, right?  On that drive, look in /Users/youruser/Library/Preferences/Mail/, where you'll find all the mailboxes.  You should be able to import mail straight from any of those into a new mailbox in Mail.

  • Is you mail app crashing when using the trash can delete??

    Is anyone having a problem with mail app. crashing after using the trash can delete. I am no longer using the trash can so I have not had another mail crash. Swipe and delete and edit and delete work ok. Only the trash can delete causes the problem.

    Alberta....I first tried the reset, which didn't work, so I had to do a full restore. Which helped has corrected the problem. I just can use the trash can delete.

  • I've deleted all my mail in iCloud and also empty trash, but iCloud mail still occupied my iCloud storage for 1.9GB. What do I do?

    Dear All,
    I've deleted all my mail in iCloud and also empty trash, but iCloud mail still occupied my iCloud storage for 1.9GB. What do I do?
    BR.

    Hi OaksterMe,
    In order to completely delete emails from your devices and free up space in iCloud, you should follow the steps in this article -
    iCloud: Reduce email storage space
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • TS3899 iPhone 5s Mail app shut down automatically when try to send email

    I just set up new iPhone 5s two days ago from iPhone 5.
    Everything works fine except Mail app.
    Due to Mail app, I had to set up new configuation instead of back up from old iPhone 5.
    Mail app works fine 1 day, but after the day after, the mail app shut down automatically when try to send email.
    Just one specific email account has problem. It worked fine on iPhone 5. Same setting on Pop and SMTP. Exactly same~~
    - I did try to reset iPhone 5s pressing home button and sleep button for 10 second. It did not work
    - I did try to reset all information and install iPhone 5s and the problem still exists.
    - I did try to delete specific email account and re-make it, but it did not work
    Funny thing is that if Lanuague is English, then sending email is working. Absolutely no problem.
    However, if Language setting is Korean, then Mail App shut down automatically.
    I'm heavy email maker and if it is very annoying.
    Does anyone have same issue like this?
    I believed it is iOS7 bug?
    Can anyone help me on this???

    Am having similar problems with a new iPad Air. It will recieve email in Mail as directd from my domain email account. It will not send, advising server does not recognise account. I have checked and re checked settings.
    My computer and old iPad work perfectly. Any ideas would be really appreciated.
    By the way sending email directly from the domain email account works perfectly but I prefer using Mail.
    James

  • TS1702 On my iPad 2 the mail app opens and the page icons are there but no mail. I can access my mail in other ways so I know mail is being received.

    On my iPad2 the mail app opens and the page icons are there but no messages are shown. I know mail is being sent as I can access it in other ways plus the envelope icon on my homepage continues to show the number of messages received.
    I have rebooted twice now but cannot think of anything else to do
    Help please

    Go to Settings>Mail the account and turn the account off and then back on
    Next delete the account from the iPad and reenter the settings.

  • Has anyone else had an issue where Mail.app signatures and rules disappeared?

    For unknown reasons, I lost all my Mail.app signatures and Rules on Oct 10, 2012 at about 9:00AM PST.
    Anybody else see something like this?
    Also, I am getting sandboxd warnings that are Mail preference related....
    I am guessing that the preferences access error that the sandboxd is having is related but who knows...
    Anybody seen these kinda log messages?
    11/8/12 6:08:53.579 PM sandboxd[1589]: ([423]) Mail(423) deny file-read-data /Library/Preferences/com.apple.mail.plist
    repeated many times per hour.
    there also seems to be a problem with the mdworker process .... that is perhaps related to the Mail issue....
    Oct  9 00:37:26 mbp15.thaijavaworks.net mdworker[5984]: Unable to talk to lsboxd
    Oct  9 00:37:26 mbp15.thaijavaworks.net mdworker[5983]: Unable to talk to lsboxd
    Oct  9 00:37:26 mbp15.thaijavaworks.net mdworker[5985]: Unable to talk to lsboxd
    Oct  9 00:37:26 mbp15.thaijavaworks.net sandboxd[5987] ([5984]): mdworker(5984) deny mach-lookup com.apple.ls.boxd
    Oct  9 00:37:26 mbp15.thaijavaworks.net sandboxd[5987] ([5983]): mdworker(5983) deny mach-lookup com.apple.ls.boxd
    Oct  9 00:37:26 mbp15.thaijavaworks.net sandboxd[5987] ([5985]): mdworker(5985) deny mach-lookup com.apple.ls.boxd

    I think this is an issue with the phone's proximity sensor (the one that turns the screen off when you hold it up to your ear). It's a bug that seems to occur when you switch to another app (any app) while still on a phone call. You'll notice in Messages that the screen goes dark when you move your thumb over the earpiece/iSight camera, but not when you move your other thumb.
    Simplest solution is to force-quit the Messages app (double-click the home button, and swipe up on the app). The problem should resolve itself when you restart Messages.

  • Mail.app plugins and dot releases...

    I am a beta tester, currently using the 10.6.7 beta on my MacBook as I write small programs for my own personal use in my day to day professional life so need to keep myself up to date to make sure my workflow can carry on uninterrupted (I am a Medic, so making sure I can do my daily work without interruption is VERY important).
    Each dot update for OS X Snow Leopard seems to break mail plugins, this is not an isolated or unknown issue and it's not just the betas, the GM updates also break mail plugins. I currently use GrowlMail and WideMail, but not WideMail does not work following the update to 10.6.7.
    Any fixes? Normally the old adding plugin UUIDs to the .plist files for each plugin works but I haven't been able to find any info on the plugin UUIDs for 10.6.7.
    C'mon Apple, I know the plugins are third party and not your responsibility, but mail.app is and each time we update our plugins stop working. 9 times out of 10, we don't need new plugins, we just need to modify the ones that exist. What happened to it just works? Am I doomed to have to keep repeating this process with each update?
    Must be a better way...

    yes...and it has now happened again with the release of 10.6.7. My Mail plug-ins have all gone AWOL.
    Rather than looking for ways to update the plug-ins, or forcing users to jump through hoops to make them work, shouldn't Apple be incorporating some new features into Mail itself? As an email client, it's way behind where Eudora was 10 years ago.
    My main issue with Mail is visibility- it's very easy to miss an important incoming message.
    BTW, beta testers are supposed to sign an agreement that they won't tell anyone they are beta testers, or what they're doing.

  • Mail app not automatically deleting trash emails

    iTunes 11.1.2.32 Windows 7 32 Bit
    iPhone 4S (and iPhone 4)
    iOS 7.0.3
    I have my own domain name for my email.
    I can access via POP3 SSL and IMAP SSL
    My first iPhone was a 4 which i used July 2010 to July 2012. I July 2012 i upgraded to my current 4S.
    I use Windows Mail on my PC to access my email via POP3 SSL as i have no need to keep messages on a server any longer than i need to.
    I use the Mail app on my iPhone to access the messages via IMAP SSL. Up until iOS 7 i would check my emails using the iPhone and delete any messages to the Trash folder On My iPhone (not on the server). I would have it set to delete the deleted messages After One Day so i had a 24 hour safety buffer.
    This way i could use the iPhone as a quick check on my email and also use it as a Spam filter. If i needed to reply to an email from my iPhone I would and cc myself in if i needed a copy. One or twice a week i would fire up the PC and download the messages in the Inbox to the PC in Windows Mail.
    This arrangement worked flawlessly for 3 years until i updated to iOS 7. Now the deleted messages in my Trash folder stay there until i manually remove them. I've tried:
    -deleting and resetting up the account again in the iPhone
    -changing the setting to One Month, saving the change and then setting it back to One Day and saving the setting.
    -checked with my domain/email provider that i'm using the correct settings.
    -changed IMAP Path Prefix from \ to INBOX, which works the first time but then fails to work again (i.e. each time i change it to \ and then back to INBOX it clears everything over a day old at that point but then doesn't do it again)
    My wife has my old iPhone 4 without a SIM and uses it as an email checker for her account as well as for surfing the net and Facebook etc. She has the same setup as me (but seperate email account on my Domain) it all worked fine on that too until the update to iOS 7.
    Is there a setting that might have gone out of line here or something i've missed?

    There are actually two settings that could have a bearing on this:
    Preferences > General > Check for New Mail
    Preferences > Accounts > Advanced > Include when automatically checking for new mail
    Also, go to Apple Menu > System Preferences > Network > Show: Network Port Configurations, and make sure that the configuration used to connect to Internet appears at the top of the list.
    Do you have any Mail plug-ins or any system utilities that could interfere with Mail? In the Finder, go to each of the following folders (if they exist). What do you see there?
    /Library/StartupItems/
    /Library/InputManagers/
    ~/Library/InputManagers/
    /Library/Mail/Bundles/
    ~/Library/Mail/Bundles/
    Also, open System Preferences, and go to Accounts > Login Items. What do you see there?
    Note: For those not familiarized with the ~/ notation, it refers to the user's home folder. You can easily locate any of the folders referred to in this post by copying the file path here, doing Go > Go to Folder in the Finder, and pasting the file path there.

  • IPhone, Gmail and automatic message deletion

    I set up my Gmail account on my iPhone 4S. It does some weird things like downloading 500 spam messages to my phone automatically, which I really don't need. But my main question is that when I delete a message on my phone from the Gmail account, it also deletes it from my main computer. How can I change this? I like to keep emails on my laptop, but delete duplicates on my iPhone. I don't want to delete them entirely. I found no setting in the iPhone or in my Apple Mail that controls this. Generally I don't know if the control of this is on my laptop, on my iPhone, or somewhere in Gmail, and how to change it.
    Thank you.

    Have you confirmed your account settings for removing messages from the server when downloaded by the Mail.app on your computer, and with the iPhone's Mail client?

  • Mail.app messages dont get deleted in GMail

    I know that in GMail accounts, deleted messages dont really get deleted but end up in the archived.  Please read on.
    I have been using my GMail account as a POP3 account on both my Mac and iPhone.  I recently replaced my old Core Duo MacBook Pro with a new Retina MacBook Pro, and decided to swap our both my phone and Mac to use IMAP so I can sync actions between devices.
    The problem is with Mail.app.  I followed Google's recommended settings, unchecking the option "Move deleted messages to the Trash folder", and for the most part when I delete something on the iPhone it seems to reflect in Mail.app and visa-versa.
    The problem is that I have a LOT of junk mail that I was deleting when setup POP3, but which was really only deleting the local copy by moving it to the trash.  So, I was trying to use the search tool to search and remove blocks of stuff, like spam from Amazon.com etc.  So, the process I was trying to do was:
         1) Use the search field to search a sender I want to whack messages from
         2) Select the messages found
         3) Hit delete OR Control-click and choose "Delete" from the context menu
    The messages dissapear, BUT if I search again, there they are!  I hate to think I will need to go through ALL 31000+ messages and delete stuff.  Is this a bug, or an "undocumented feature", and either way, is there a better way to mass-delete suff?
    Thanks in advance...

    Nathan,
    Just ordered an iPhone 3G (my first Apple product) that I should receive in the next couple of weeks. My company has already said they won't certify it for use on Exchange so I plan on accessing my email via IMAP. With my Moto Q there is no problem...anything I delete on my phone is deleted, the next time the phone checks/refreshes the server, in Outlook. Is this not the same with the iPhone? For me that would create a big problem as I travel most of the time and process a large number of emails. I wouldn't want to have "delete" them twice...
    I think I also saw some reference to going to preferences and identifying the folder you want messages deleted on the phone to go to on the server...if that is all I have to do then all is well.
    I'd really like to get the iphone, but I can't afford to handle email twice... I'm hoping you'll confirm that I won't have to.
    Thanks

  • Mail.app, movamail and gmail

    hi
    I use gmail for my main email account, which I access predominantly via mail.app. I've recently started using movamail on my mobile phone to check email periodically and I've realised that this marks the gmail messages as 'downloaded' in some way (although the messages are still marked as unread on gmail), so that when I check for new messages via mail.app, it does not download the messages that I've viewed on my phone.
    Is there some way to set mail.app to download all new unread messages? Or is there some setting on gmail or movamail that anyone know about?
    any help gratefully received.
    thanks
    Jamie
    ibook   Mac OS X (10.3.7)  
    powerbook   Mac OS X (10.4.8)  

    Hi Jamie.
    This is a Gmail issue that you can do nothing about if you want full POP access to your Gmail account from more than one computer. Gmail POP access does not work as a normal POP mail server should. Here are some of its idiosyncrasies:
    1. Messages downloaded by any conventional POP mail client are marked as downloaded at the server (but not as read on the web), and no longer available to either the same or any other POP mail client.
    2. To make already downloaded Gmail messages available for POP access again, you must log into your Gmail account with a web browser and re-enable POP downloading for all your messages, which will cause everything (and I mean everything) still there to be downloaded again.
    3. Any Mail > Preferences > Accounts > Advanced > Remove copy from server settings have absolutely no effect on the messages stored on Gmail’s server. The reason is that, after being downloaded, those messages are no longer available to any mail client, not even to the same client that has just downloaded them, not even for deleting them or checking whether they are still there.
    4. Messages created and sent using the web interface will be downloaded by your POP mail client as if they were incoming messages. You can set up a rule in Mail to automatically route those messages to the appropriate Sent mailbox (or to any other mailbox for that matter) if that's what you want. Although this may seem weird, it's good because it allows archiving all messages locally in Mail, regardless of how they were sent -- as long as you don't access the same Gmail account with more than one mail client, that is.
    5. Messages created and sent using a POP mail client such as Mail are also treated as if they were incoming messages for POP purposes, just as in 4. What prevents them from being downloaded is that Gmail marks them as already downloaded immediately. They would, however, be downloaded if Gmail settings were changed as described in 2 above.
    6. As a particular case of 5, messages sent to yourself will appear in your Inbox on the web, but won’t be available for download by any POP mail client either.

  • Sending GMAIL from Mail.app generates multiple items in Trash

    I just recently began using Mail.app for my Gmail and I’ve got a problem. I noticed that when I draft a short Gmail and send it out, I get multiple copies of the e-mail in Trash. But each copy there contains only a few words from the original. For example, the first copy may contain only the first three words of the original. Subsequent copies in Trash display the remainder of the original. I sent out a 20 word e-mail and it was broken down into 10 different entries in Trash. Anyone else have the same problem?

    jackgm,
    I have to Gmail accounts; a free account, and a university Google Apps (.edu) account. Both accounts behave exactly the same on three different Macs.
    The bottom line is it's a pretty well known issue with Apple Mail and Gmail. The easiest solution is to turn off "Save Drafts on Server".
    It's a minor annoyance but hardly a major issue. For a long while, if you mapped Sent in Mail.app to the Sent Items folder in Gmail, you'd get duplicate copies of all your sent e-mails--Apple has since fixed this (thankfully).

  • Podcasts app won't remember played episodes and automatically deletes played episodes.

    I'm using an iPhone 4, iOS 6. I run a Mac and have set podcasts to keep 1 most recent episode. It simply will not honor this setting. Tried deleting/reloading Podcasts app won't remember played episodes. It will randomly decide all xx previous episodes are new and unplayed. Even after marking all as played it will show it as such and then an hour later revert. This is not shown on my home computer or on an ipad or what not just FYI. It automatically deletes played episodes. I'd like to keep the most recent episode of all the podcasts I subscribe to and only delete once the new one is downloaded. In case I want to refer back. It regularly deletes them, requiring me to redownload the episode and annihilating my data cap. It just won't actually sync or work correctly at all.
    Any advice or help is very much appreciated. I hate to vent; it is just exasperating.
    PS: I understand many people like third party providers and you'd think I'd have done that given how much I listen to podcasts but this ought to work and work like Amazon's whispersync. Whoever is in charge of this is a bozo that's blowing it and I hope they are aware of it.

    I am also having problems with 100s of played podcasts being listed.  Like others, if I delete a podcast, it reappears as unplayed the next time I open podcast app in a WiFi zone.  In the meantime, the app stops working while it tries to handle all the new info.  Finally for some podcasts, it plays and old episode when I select the most recent. I keep selecting "Mark all as played" only to see 100s show up a few hours later. I would prefer played episodes not to be listed in menu at all!
    I listen  to podcasts on the subway without any ability to stream and prefer to access only from my phone and not have to fuss with computer.
    I have read that if you delete the app to go back to using Music app, you can no longer download new podcasts but must do in iTunes.  Is there any fix or workaround?

  • Accidentally deleted MobileMe mailbox in Mail.app 4 and now need to recover

    Here's what's up. Yesterday I accidentally deleted a mailbox on my MobileMe account. The one that has 30000+ messages in it form the past 3 years...
    Realizing how stupid that was I immediately made a copy on a safe place of the local cache on my computer. So now I have a copy of that entire mailbox in .imapmbox format. Today I have tried to find a solution to figure out how to get that email back into Mail.app and I fail to find a way.
    I have tried to make a bogus IMAP account and copy the mailbox to it but nothing happens, I have tried to import the email using the import tool in Mail.app but it can't recognize the filetype, I have tried to just copy the entire mailbox into the Mailboxes directory in my Library and then it actually appeared in the "On My Mac"-list as a mailbox but with no messages in it.
    I have use emlxtombox converter and that gave me some result but the attachments were omitted.
    What to do?

    Have you tried to import the mail box? You are trying to copy a back file into the mail app, it will not work as you found out. You should look into a way to backup your files.
    try the following:
    import mail box
    http://support.apple.com/kb/HT2442
    to restore
    http://docs.info.apple.com/article.html?path=Mail/4.0/en/15171.html

Maybe you are looking for