S-Mail Cli Client
Send emails with attachments from the command line
Usage
Set your credentials
For Gmail to get you credentials password
- Go to Google Account and click on the avatar on the top right corner and click on
Manage your Google Account
- Find the Security section on the left side
- In the Signing in to Google section, Enable 2-Step Verification if not already enabled
- In the same section, click on App passwords
- Select
Mail
as the app and Other
as the device and give it a name
- Click on Generate and copy the password
bash
$ smail credentials -p smtp.gmail.com -e myemail@gmail.com -c super-secret-password # set your credentials
Send an email with attachment
```bash
file must be in the current directory
$ smail email -t recipient-email@gmail.com -s "Here is the pdf file" -a filename.pdf # send an email with a subject and an attachment
```