[pmmail-list] Is it possible to edit the subject of incoming messages ?

Paul Ratcliffe pmmail-list@blueprintsoftwareworks.com
Sat, 03 Feb 2001 17:55:19 +0000 (GMT)


On Sat, 03 Feb 2001 08:54:28, Xav wrote:

>>Yes, you can filter using a Message Receive Exit script.
>
>Could you give some pointers as to how to do this please ?

Here's the REXX script I wrote to do this. As you are a 'doze user, I 
have no idea if you can use this or even if message receive exits are 
supported. The option on OS/2 is under Account, Account Settings, REXX.

/**/
arg file
inhdr = 1
i = 0
modflag = 0
do while lines(file) <> 0
  i = i + 1
  line.0 = i
  line.i = linein(file)
  if inhdr = 1 then
    if length(line.i) = 0 then
      inhdr = 0
    else if left(line.i, 8) = "Subject:" then do
      parse var line.i p1 '['match']' p2
      if match = 'pmmail-list' then do
	line.i = strip(p1) strip(p2)
	modflag = 1
      end
    end
end
call stream file, 'C', 'CLOSE'
if modflag = 1 then do
  '@del' file '2>nul'
  do i = 1 to line.0
    call lineout file, line.i
  end
  call lineout file
end

Unlike the version posted by Bruce Francis, this one only looks at 
header lines, so having a line starting "Subject:" in the body won't 
get mangled unexpectedly.

- pmmail-list - The PMMail Dicussion List ---------------------------
To POST to the list, send your message to
pmmail-list@blueprintsoftwareworks.com

To UNSUBSCRIBE, send a message to mdaemon@bmtmicro.com with the first 
line of the message body being...

UNSUBSCRIBE pmmail-list@blueprintsoftwareworks.com
---------------------------------------------------------------------