[bash] Send console output as email

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
User avatar
rednoah
The Source
Posts: 15783
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

[bash] Send console output as email

Post by rednoah » 19 Feb 2019, 08:37

send-email-log.sh is a universally useful little bash script, that takes an arbitrary command, executes the command, captures the console output, and then sends you a nicely formatted HTML email.

Usage:

Code: Select all

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

Code: 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:

Code: Select all

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

Image
:idea: Please read the FAQ and How to Request Help.

JerickWell
Posts: 3
Joined: 05 Feb 2019, 10:33

Re: [bash] Send console output as email

Post by JerickWell » 27 Feb 2019, 10:35

Interesting. I did not even know that there is a very convenient script. Until now, I was used email software services - https://www.atompark.com/web-email-extr ... l-grabber/ Thanks for information.e information!
Last edited by JerickWell on 28 Feb 2019, 13:44, edited 1 time in total.

User avatar
rednoah
The Source
Posts: 15783
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [bash] Send console output as email

Post by rednoah » 27 Feb 2019, 12:20

Well, easy enough to come up with this yourself, but it's a commonly requested feature, so I thought I'll share a model solution.
:idea: Please read the FAQ and How to Request Help.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests