[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] (no subject)



I wrote a shell script to a file from sqr and then used call system to
execute the shell script.  here is the code. $email_addr was supplied by
the user.

let $emailscript =
getenv('HOME')||'/ivan/'||'email_'||$prcs_process_instance||'.ksh'

open $emailscript as 3 for-writing record = 500 status = #script_open

if #script_open <> 0
let $prcs_run_status='E'
let $prcs_message_parm1 = 'FTP File open error'
do update-prcs-run-status
rollback
stop
end-if

Let $csvfile = 'CSV_FILE='||$outfile
let $mail_sub = 'Activity by QBL '||$ReportID
Let $mail_list = 'EMAIL_LIST='||$email_addr

write 3 from $csvfile
write 3 from $mail_list

let $email_string = 'uuencode '||$outfile||' '||$outfile||'|'||'mailx -m
-s "'||$mail_sub||'" $EMAIL_LIST'

write 3 from $email_string
close 3

let $chmode_command = 'chmod +x '||$emailscript
call system using $chmode_command  #unix_status 

call system using $emailscript #emailrc

if #emailrc <> 0
!let $prcs_run_status='E'
!let $prcs_message_parm1 = 'ftp error'
!do update-prcs-run-status
show 'error on return code ' #emailrc
!rollback
end-if
end-procedure 350-email-csv-file
 

-----Original Message-----
From: sqr-users-admin@sqrug.org
To: sqr-users@sqrug.org
Sent: 10/18/2003 4:48 PM
Subject: [sqr-users] (no subject)






Hello,

    Is it possible to send emails thru Sqr, and if possible, how to  do
it.

  Any information will be highly appreciated!!!!


TIA
Sridevi



_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users