omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Empty email trash iphone daily

    Pythonista
    gmail google
    2
    3
    2163
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • smiddleton
      smiddleton last edited by

      Hey all, thanks for your help with my last project.

      I was wondering if you could help me out with a new idea. On this one I have no clue where to start, so go slow for me.

      I need help writing a script that accesses my mail on my iPhone, and deletes the trash automatically. Ideally every day, however, I'd like to be able to change it. Oh, and I use the ios app for email, but it's a Gmail account.

      This means pythonista will always be running in the background but I'm fine with that.

      Is this even possible? Thanks in advance for the help.

      Steve

      1 Reply Last reply Reply Quote 0
      • dgelessus
        dgelessus last edited by

        There's no way for Pythonista to interface with the iOS Mail app - iOS doesn't provide any APIs for that. You could instead use the imaplib module to access your Gmail mailbox directly. But in any case there's no way to set up a regular task like that - Pythonista can't run in the background for very long before iOS pauses/terminates it.

        I don't use Gmail very much, but maybe there's an option in their web interface to empty the trash regularly, or delete mails that were left in the trash for some amount of time. Desktop mail clients (like Thunderbird or the macOS Mail app) usually have that kind of feature as well, so if you have one set up, you can probably configure it there.

        1 Reply Last reply Reply Quote 0
        • smiddleton
          smiddleton last edited by

          Well that's a bummer.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors