4 releases
0.2.0 | Nov 24, 2024 |
---|---|
0.1.6 | Oct 12, 2023 |
0.1.4 | Nov 10, 2022 |
#64 in Email
138 downloads per month
17KB
331 lines
S-Mail Cli
Send emails with attachments from the command line using your gmail account More accounts support coming soon
Usage
Instructions on how to get your Gmail app password
Run the following command to get instructions on how to get your Gmail app password
smail instructions
Store your credentials
$ smail credentials -p smtp.gmail.com -e myemail@gmail.com -c super-secret-password # stores your credentials for future use this is encrypted
Send an email with a subject and file attachment
$ smail send -t recipient-email@gmail.com -s "Here is the pdf file" -a ./filename.pdf # send an email with a subject and an attachment
List all credentials
smail list
# list all credentials ie
{
"provider": "smtp.gmail.com",
# Hashed password
"password": "d29lZHJteGNxcHh3cmFyaA==",
"email": "myemail@gmail.com",
}
Commands
Cli tool to easily send emails with attachments
Usage: smail <COMMAND>
Commands:
instructions Get instructions on how to set up your credentials
credentials Store your email, password, and provider
send Send an email
list Get a list of all the credentials
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
Redis Storage
- Redis is used to store your email credentials securely. The email and provider are stored in plain text, while the password is encrypted before being saved.
- Make sure you have Redis installed and running locally or configure it to use a Redis server in your environment.
Notes:
- Security: Always ensure that your Redis server is secured and not accessible to unauthorized users.
TODO
- Add support for more email providers
- Add support for sending emails with multiple attachments and body text
- Add tests
- refactor code to make it more modular
Dependencies
~9–21MB
~315K SLoC