| Difficult....if you want to make it painless.
Easy way is to modify the Read options, to scan and then modify the
files (at least in presentation to the users - you won't be able to
easily muck around with the shared mail area)
You might be able to put a DO script call in the mail bolierplate
which might help make it easier, but I'm not sure if that will work.
Winton
|
| Thanks for the responses. I went the easy route. Here is the code.
The boilerplate "Mailblp" is the same as Mailmemo1.blp except the include
includes the temp.wpl file. A new option is added to EM$INDEX$OPTIONS
which calls the script.
get oa$curmes=oa$scroll_key
cabinet current oa$curmes
get #file=cab$.filename[oa$curmes]
!
!Open a file to put the keep message stuff
TEXT_FILE OPEN OUT "temp.wpl" /write
TEXT_FILE OPEN #FOO #file /read
!
!Look for the word Return in first line of message
.label startread
TEXT_FILE READ #FOO
.if oa$status eqs 0 then .goto done
get #rec=#text_file_rec
.if #rec:11 eqs "Return-Path" then .goto dumpit
TEXT_FILE WRITE OUT #REC
.label cread
TEXT_FILE READ #FOO
.if oa$status eqs 0 then .goto done
get #rec=#text_file_rec
TEXT_FILE WRITE OUT #REC
.goto cread
! First line of message was word Return. discard all untill blank line
.label dumpit
TEXT_FILE READ #FOO
.if oa$status eqs 0 then .goto done
get #rec=#text_file_rec
.if #rec nes " " then .goto dumpit
TEXT_FILE WRITE OUT #REC
.goto cread
!Done .. Display text, clean up, refresh screen etc.
.label done
display SMTP Addressing removed\force
text_file close #foo
text_file close out
list<merge general$apps:mailblp
dump_cache
WRITE CHANGE CAB$ .%KEY =OA$CURMES,MODIFY="Y",DELETE="Y",MAIL_STATUS="READ"
CABINET DELETE_OR_REFILE ,"READ"
CABINET DECREMENT_COUNT "MAIL"
delete_file temp.wpl
oa$scl_update cab$.%address[oa$curdoc]
oa$scl_refresh
|