I needed to create a daily (automatic) email with information about a service I am using. I wrote a Java program that gathers information from that service and puts it into a .xls
file. This Java program also prints diagnostic information to STDERR
.
I would like to email the .xls
file as an attachment and have the diagnostic information in the email body. How can I get this information in the email through the command-line?