What am I missing, email from filePro
Robert T. Repko (R Squared Consultants)
rtr at rsquared.com
Fri Aug 22 05:57:06 PDT 2008
For several years I have been running a script that generates a file
from filePro and then email (using lightmail) it to the client. This
has work great but now I need to change the procedure and mail from
within my filepro processing table. I say to myself 'no problem, use
the system command to send the email'. Well, after about a week of
beating my head against a wall I give up and am asking for another
set of eyes to see if they can spot what I am doing wrong. When a
person logs in I assign information to environment variables that I
will use either in scripts or in this case from within filepro to
email an invoice. Right now I am looking to email at the very end of
the report (@wgt), I may change the location to a different break level.
Environment variables:
emailname=clientaddr at theirdomain.xxx
LOGNAME=login name
emailfile=the filename I write to from within filepro
wordproc=the filename extent (some use word (.doc) and some use
wordperfect (.wpd))
First I use getenv to read the environment variables:
@wgt:::
:'from:qs(19)="-f rtr at rsquared.com":
:'mail server:qt(17)="-t 192.168.11.254":
:'subject:'qu="-s Billing Report to"{getenv("emailname"):
:'attachment:'qv="-a /reports/
"{getenv("LOGNAME"){"/"{getenv("emailfile"){"."{getenv("wordproc"):
:'email address:qw="-r $emailname":
:'message in body:qx(27)="-m /reports/message/billrep":
::system "/usr/local/bin/lightmail/lightmail"<qs<qt<qu<qv<qw<qx:
::end:
When I run the processing table I create the report but noting is
emailed. To make sure correct information was being passwd through
to the shell I created the following which simply echos the command to a file.
::system
"echo"<"/usr/local/bin/lightmail/lightmail"<qs<qt<qu<qv<qw<qx<"> /tmp/azx2":
The file azx2 contains:
/usr/local/bin/lightmail/lightmail -f rtr at rsquared.com -t
192.168.11.254 -s billingReporttortr at rsquared.com -a
/reports/root/marcy.doc -r rtr at rsquared.com -m /reports/message/billrep
That's exactly what it should be, if I execute the file azx2 from the
command prompt I do receive the email.
I did further testing of the command line using static information
instead of using getenv to retrieve the information but that worked,
or should I say didn't work, the same way ... no email sent. I can
supply the additional lines I used for testing is anyone would like
to see them.
I'm stumped, can anyone think of a reason why it would not email from
the system command.
More information about the Filepro-list
mailing list