README
✉️ alfred-simple-email-fetcher
Fetch and show emails through imap
📌 Prerequisite
Node JS onwards
11.7.0
(Due to usingworker_thread
module)
🔨 How to install
- Install package by npm
$ npm install --global alfred-simple-email-fetcher
Run
em > config
and setup account settingsSet the imap settings for the account you added. May you can refer to the documents
📍 Configuration
You can configure detailed settings by editing your config.json
.
Example:
{
"autoMarkSeen": false,
"providerPrefix": true,
"subtitle": "date-from",
"cacheDuration": false,
"maxEmailsCount": 50,
"sorting": "provider-timedesc",
"accounts": {
"google": {
"enabled": true,
"icon": "google.png",
"imap": {
"user": "user@gmail.com",
"password": "account_password",
"host": "imap.gmail.com",
"port": 993,
"tls": true,
"authTimeout": 3000
}
},
"naver": {
"enabled": true,
"icon": "naver.png",
"imap": {
"user": "user@naver.com",
"password": "account_password",
"host": "imap.naver.com",
"port": 993,
"tls": true,
"authTimeout": 3000
}
}
}
}
autoMarkSeen
Type: Boolean
Mark seen when fetch emails
providerPrefix
Type: Boolean
Append email provider name to email record.
subtitle
Type: String (enum)
date
or from
or date-from
or from-date
or account
or default
default value shows account, date, from.
cacheDuration
Type: Number | Boolean
set cache period (ms)
To not use caching, set this value to false
maxEmailsCount
Type: Number
Set the maximum number of emails to display.
sorting
Type: String (enum)
Sorts and returns search results.
subject
(mail title)provider-subject
(sort provider first and subject)timeDesc
(recent email first)timeAsec
(old email first)provider-timeAsec
provider-timeDesc
accounts
Type: Array of object
You can register multiple email accounts.
this workflow use worker_thread
at each imap connection.
enabled
Type: Boolean
If this value is false, this account is ignored.
icon
Type: String
Show this icon on this account's emails.
icon files should be placed within icons
folder.
imap
Type: Object
imap configuration object used by node-imap.
imap's default port value is 993
.
you could find out host
value in your account's imap setting page.
keepalive
option will be set false in script, you can set other options in config file.
📗 How to use
emu
Fetch and show emails on UNSEEN
state from registered accounts.
emc
Fetch and show emails on UNSEEN
state from registered accounts.
emc
doesn't fetch and cache email's html body, So it could be faster than emu
.
emau
Select one provider and fetch only the account's UNSEEN
emails.
You can fetch emails which account's enabled
is false by this method.
emd
Fetch and show emails on DRAFT
state from registered accounts.
emad
Select one provider and fetch only the account's DRAFT
emails.
emf
Fetch and show emails on FLAGGED
state from registered accounts.
emaf
Select one provider and fetch only the account's FLAGGED
emails.
emans
Fetch and show emails on ANSWERED
state from registered accounts.
emaans
Select one provider and fetch only the account's ANSWERED
emails.
em > config
Open the config.json
file through your editor.
em > clearcache
Clean all saved html cache.