For those mails which aren't important, but you still want to keep an eye on them.
sumo is a productivity tool, which periodically checks a directory (or Gmail label) in your mail inbox for new mails, sends you a summary of them and marks those mails as read. Keep your inbox clean, but also don't miss something! Currently it sends the summary via mail, but sumo is programmed to be extendable with more adapters. Feel free to contribute more adapters! 🎉
A mail containing a list of new mails? This may sound silly, but it really isn't.
This works perfectly with mailbox filters. Move those mails, which aren't really important (like newsletters or spammy mails), automatically in a separate directory and keep your Inbox clean. Lean back and let sumo send you a summary of those mails daily, once a week or whenever you'd like to. You can read more about my usecase and why I built sumo in the section Background.
- Background
- Usage, the very simple way
- Usage, the manual way
- More useful Informations
- Contribute
- License
I get a lot of spam to the email address, which is listed in the WHOIS of my domains. But sometimes important mails can get delivered to that email address, like mails from ICANN. With sumo, I can use an email alias like "[email protected]" in my WHOIS, and configure an appropriate Gmail filter, which archives and labels mails delivered to that address. Now those mails won't distract me, but once a week I get a summary and can see if I got an important mail between all those spam mails.
- Deploy it to a free Heroku Dyno:
- Fill out the necessary environment variables.
- Configure the Heroku Scheduler to call
npm start
whenever you'd like to.
Hint: If you want to run the Scheduler every few days, choose Daily, the desired time, and use something like this:
if [ "$(date +%u)" = 3 ]; then npm start; fi
… where 3
is the third day of the week, Wednesday. Then it will only be executed on a Wednesday. 🙃
- Clone this repository
npm install
npm start
runs the worker and exits.- You need a scheduler, which runs
npm start
on your behalf every few days or however you like it
- Node (a newer version)
- npm (5 would be good)
- A scheduler would be great
If you want to use sumo with your Gmail Account, you need to create an App password. Your Google password won't work.
Simply deploy more instances. 🙂
Feel free to contribute! 🚀 More Adapters would be great. Everything is possible. Slack, Telegram, Fax, you name it.
- Add a new file to
/adapters
(see/adapters/smpt.js
for an example) - Register it in
/lib/send-to-adapter.js
- Set the
SUMO_ADATER
environment variable to your new registered adapter. - Open a Pull Request so everyone can use your awesome adapter!
If you need to provide customizable data, use environment variables.
Example:
// lib/send-to-adapter.js
'use strict'
const adapters = {
SMTP: require('../adapters/smtp'),
FANCY: require('../adapters/fancy-thing') // <- this is your new adapter!
// To use it, set the env variable
// SUMO_ADATER to FANCY
}
// ... No need to modify things below.
// adapters/fancy-thing.js
'use strict'
const GenericAdapter = require('../lib/generic-adapter')
module.exports = class FancyAdapter extends GenericAdapter {
constructor(mails) {
super(mails)
// `this.mails = mails` is already configured in the Superclass.
}
run() {
// this.mails is an array of all new mails as mailparser headers:
// https://nodemailer.com/extras/mailparser/
const firstFrom = this.mails[0].headers.get('from').text
const firstSubject = this.mails[0].headers.get('subject')
const firstDate = this.mails[0].headers.get('date')
// ...and now send this to some service!
}
}
MIT © Timo Mämecke