cli scripting snippets

Sending email with Linux CLI through SMTP.

Tagged email, smtp, cli scripting  Languages bash

Great for scripting e.g motion to send the captured images + movie into your email. No public ssh keys, no passwords, no hassles. Install on Debian with apt-get install sendemail. The email address below has naturally been altered to not be picked up by harvesters.

sendEmail -f marko_haapala@aktagon_com -t marko_haapala@aktagon_com -m "$(date -I)" -u "Possible intruder" -s smtp.aktagon.com -a /tmp/motion/file.jpg