palmtree with sun behind it CONTACT US
Phone: (412) 835-9417
Email: sales@vss3.com

Tip #43 Emailing Reports - Unix/Linux

I have a few great tricks for emailing a report or other output from filePro.

Method 1

On UNIX/LINUX systems, this can be very easy.  Create a printer with a setup like this:

emailit   :  nocodes  :  | mail -s "Report from Server" nancy@email.com

Then just select the printer called "emailit" to send the report to you as an email.

The Printer Destination column must start with a pipe (|) to make this work.  Syntax for the mail command should always include a subject represented with the

-s "Report from Server"

Part of the line.  You can add a bcc: to the output by adding -b peter@email.com to indicate a second recipient.

This has worked well for a system with no printers that has all automated reporting.  The reports run each night and are emailed to the appropriate people.  This provides a very simple method for sending reports.

Method 2

For Windows Systems, I have found it difficult to connect with the mail server so I do the following:

I write the ouput to a file.  Best results for emailing complex reports is to make an HTML output for your report.  This is not difficult but will be covered in a future Tip.  But any file can be emailed.  Just use the nocodes print table to insure that the resulting file does not have print codes that will not work at the other end of the email.

Method 3

I have also been know on Unix/Linux systems to send emails during processing to alert someone to an event.  For example, we had records being changed that no one would fess up to changing.  The manager got annoyed and we added an email warning whenever it happened.  It became clear who was causing the problems as we reviewed the emails. This kind of logic will look like this:

zq="echo \""&"whatever you want to have sent in this place"&"\" | mail -s \"ALERT\" nancy@email.com"

system noredraw zq

These two THEN lines will do it.  If you have more stuff, just build it all into a variable so the contents look like this:

echo "whatever you want to have sent in this place" | mail -s "ALERT" nancy@email.com

SUMMARY

I certainly hope that works as well for your s


Written by Nancy Palmquist

Copyright, 1997 by Virtual Software Systems.  All rights reserved.

Contact Us by: Email to Virtual Software Systems or Phone: (412) 835-9417