tmaterna.com

eml

Download eml

Eml is technically not a program. It is a perl script. You can find more information on installing perl free on your computer from ActiveState.

The documentation reproduced below is extracted directly from the in-line help by pod2html.




NAME

eml.pl - send an email after a custom command is executed.


SYNOPSIS

eml.pl [options] command [argument1] [argument2] ...


ARGUMENTS

<command [argument1] [argument2] ...>
The command line to be run by eml.pl.


OPTIONS

-h
Produce full documentation.

-O
Discard output - output in stdout is discarded. Otherwise, the output will show up in the email (Beware of large output!)

-E
Discard error - errors in stderr are discarded. Otherwise, the errors will show up together with the output in the email.

-c comment or --comment comment
Allows the user to specify a comment that will appear in the email. Useful when running different programs with similar command lines.

-s smtp-server or --smtp smtp-server
Sets the smtp server to be used. You should edit the script and set your default smtp so that you don't have to specify this each time.

-t email-address or --to email-address
Sets the email address the email is sent to. You should edit the script and set your default address so that you don't have to specify this each time.


EXAMPLES

eml -O scp -r someone@host.domain:~ .
Will run the command 'scp -r someone@host.domain:~ .' which will download the entire home directory of user someone on the host host.domain and put it all in the current directory. When the operation finishes, an email is sent to the address set in the script with the errors if any (-O discards the normal output).

eml -c ``simulation of 10^6 events'' genevents -n 1000000
Will run the command 'genevents -n 1000000'. When the operation finishes, an email is sent to the address set in the script with the errors and the ouput and mentionning the comment 'simulation of 10^6 events'.


BUGS

Could get in trouble if the output is very large and is not discarded. There are maybe a few other. Tell me if you find one: tmaterna@tmaterna.com


COPYRIGHT

Copyright Thomas Materna <tmaterna@tmaterna.com> (http://www.tmaterna.com)

Use and redistribution is allowed provided that this copyright and disclaimer is reproduced.

This code is provided ``as is'', without ANY express or implied warranties. In no event should the author be liable for any consequence of any type of use of this software.


AUTHORS

Thomas Materna <tmaterna@tmaterna.com> (http://www.tmaterna.com)


README

eml.pl wraps a user-defined command and, upon completion, sends a email with statistics, diagnostics (return value, kill signal, duration,...) and output and/or errors.


PREREQUISITES

strict, Mail::Sendmail to send the emails, File::Spec to get the platform-independent null device, Sys::Hostname to get the hostanme platform-independently and use Pod::Usage for the documentation.


OSNAMES

any OS understanding stdout and stderr redirection (e.g. 2>&1)


SCRIPT CATEGORIES

Mail Win32/Utilities UNIX/System_administration


tmaterna.com is maintained by Thomas Materna
thomas@tmaterna.com