Page 1 of 1

[bash] Send console output as email

Posted: 19 Feb 2019, 08:37
by rednoah
send-email-log.sh is a universally useful little bash script, that takes an arbitrary command, executes that command, captures the console output, and then sends you a nicely formatted HTML email.

Usage:

Shell: Select all

send-email-log filebot -script fn:sysinfo
Install:

Shell: Select all

# Fetch script
curl -O https://raw.githubusercontent.com/filebot/plugins/master/bash/send-email-log.sh

# Make script executable
chmod +x send-email-log.sh

# Link script into the $PATH
ln -s $PWD/send-email-log.sh /usr/bin/send-email-log
Configure:

Shell: Select all

SMTP_USER="<username>@gmail.com"
SMTP_PASS="<password>"

Screenshot