MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    COUNTING unread emails

    Utilities
    2
    4
    1177
    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.
    • A
      amanzimdwini last edited by

      Hi all - wondering if anyone knows of a fast way to just display the number of UNREAD emails for various accounts? EG:
      joe@public.com 2 unread emails
      suzieQ@person.net 3 unread emails
      (I wear too many hats, and this would be a nice thing to see in the morning)

      Thanks,
      K

      1 Reply Last reply Reply Quote 0
      • lavolp3
        lavolp3 Module Developer last edited by

        Good idea for a module.
        A first idea looking at this module
        https://github.com/MMPieps/MMM-Mail.
        In the node_helper.js you can find an idea how emails are fetched.
        There is a variable in client.search function:

        console.log("%s Mails fetched",Result.length);
        

        Result.length is the variable you’re looking for.
        So maybe you could use this module and rework it to just show the number of mails and not the mails themselves.

        How to troubleshoot modules
        MMM-soccer v2, MMM-AVStock

        A 1 Reply Last reply Reply Quote 0
        • A
          amanzimdwini @lavolp3 last edited by

          @lavolp3 THAT made my head hurt. Schoene Idee, aber ich kann kein whatever-that-language is. I’d be willing to learn, though, so I’ll start reading up on modules.

          K

          lavolp3 1 Reply Last reply Reply Quote 0
          • lavolp3
            lavolp3 Module Developer @amanzimdwini last edited by lavolp3

            @amanzimdwini so, I played around a bit since I thought it would be a good idea as well.

            I found two mail modules, MMM-Mail by @Pieps and one called email. I can’t get the email module to work, but this one has support for multiple accounts, so that’s unfortunate.

            With the MMM-Mail one, I have forked it and created a branch. Unfortunately it currently only supports one account as far as I can see. Try it out and let me know what you think.
            https://github.com/lavolp3/MMM-Mail

            Clone it by putting in

            git clone https://github.com/lavolp3/MMM-Mail
            

            I still have some issues with the module itself (giving me popup messages far too often and failing to connect with the mail account too often, but if this works I’ll make a PR for the original module

            How to troubleshoot modules
            MMM-soccer v2, MMM-AVStock

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy