Filesystem-based email CLI
The simple filesystem-based email client
npm install --global shark-mail
Shark Mail relies on a simple filesystem configuration. The following folders need to exist before launching Shark Mail...
~/sharkm
~/sharkm/outbox
~/sharkm/outbox/archive
Here's a quick oneliner to create the filesystem structure...
cd && mkdir -p sharkm/outbox/archive
Shark Mail also requires a configuration file for a few things...
module.exports = {
sender: {
host: "smtp.gmail.com",
port: 465,
secure: true,
auth: {
user: "[email protected]",
pass: "password"
}
},
addressBook: [
{ name: "Person1", email: "[email protected]" },
{ name: "Person2", email: "[email protected]" }
]
};
Currently the only supported provider is Gmail.
To receive email, you simply need to run...
sharkmail fetch
New emails that haven't been received and cached yet are created in ~/sharkm
. A new file will be created for each email.
Emails will be sent when you run...
sharkmail send
Emails that are sent will be in files in ~/sharkm/outbox
with the file extension of *.email
. All files that match ~/sharkm/outbox/*.email
will attempt to be sent.
The file format for outbound emails is the following...
<email-address-or-address-book-name>
<email-subject>
<email-body>
In short, email address or address book name on line 1, email subject on line 2, and the rest of the file (lines 3+) is the message body.
💡 If you have a draft email that you don't want to accidentally send it's a good idea to have a different extension, such as
*.email.draft
and then removedraft
when you're ready to send the email