E-MAIL

Todd todd at weshyd.com
Thu Jun 30 16:23:29 PDT 2005


sco5.07 / filepro 5.0.14r / mutt 1.4.2.1

  I have an output processing that writes the output (invoices) to temp 
files in the users directory. These are the e-mail attachments. There could 
be anywhere from 1 (right now limited to 4) to as many as needed. They are 
named as QOinv0.txt, QOinv1.txt and so on depending on how many files the 
user chooses. The following processing is what I am using to select these 
attachments and send them. My question is, how can I do this without having 
to manually build the EXISTS() fields and without having to build the 
attachment line in mutt. I don't want to be limited to how many -a 
attachments I can fit on a line. Or even a better way to find the files 
other than the EXISTS() command.
Make sense?

::an(2,.0); rs(3,.0,g):
::input popup ea "Enter E-Mail address^A":
:@sk eq "BRKY":exit:
:                            ' GET USERS HOME DIR.
:ba = getenv("HOME"):
:                            ' BUILD EXISTS() DUMMY FIELDS
:bc = ba { "/QOinv" { "0" {".txt"; bd = ba { "/QOinv" { "1" {".txt"; be = 
ba { "/QOinv" { "2" {".txt":
::bf = ba { "/QOinv" { "3" {".txt":
:                            ' DEFAULT MESSAGE FOR E-MAIL BODY.
:ea = ea < "< /appl/mutt/inv_msg":
:exists(bf) eq "1"           ' BUILD IT, 4 ATTACHMENTS
:eb="mutt -nz -a $HOME/QOinv0.txt -a $HOME/QOinv1.txt -a $HOME/QOinv2.txt 
-a $HOME/QOinv3.txt -s Invoice"
< ea; goto send:
:exists(be) eq "1"           ' BUILD IT, 3 ATTACHMENTS
:eb = "mutt -nz -a $HOME/QOinv0.txt -a $HOME/QOinv1.txt -a $HOME/QOinv2.txt 
-s Invoice" < ea; goto send:
:exists(bd) eq "1"           ' BUILD IT, 2 ATTACHMENTS
:eb = "mutt -nz -a $HOME/QOinv0.txt -a $HOME/QOinv1.txt -s Invoice" < ea; 
goto send:
:exists(bc) eq "1"           ' BUILD IT, 1 ATTACHMENT
:eb = "mutt -nz -a $HOME/QOinv0.txt -s Invoice" < ea:
send:              ' SEND IT
:system eb:

TIA

**********************************
Todd Koenig
Western Hydrostatics, Inc.
(951) 784-2133
Rexroth Service Center ASC22
www.weshyd.com
********************************** 



More information about the Filepro-list mailing list