Send emails with attachments from the command line
Manage your Google Account
Mail
as the app and Other
as the device and give it a namebash
$ smail credentials -p smtp.gmail.com -e myemail@gmail.com -c super-secret-password # stores your credentials for future use
bash
$ 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
bash
$ smail list # list all credentials ie {
"provider": "smtp.gmail.com",
# Hashed password
"password": "d29lZHJteGNxcHh3cmFyaA==",
"email": "myemail@gmail.com",
}
bash
$ smail --help