[pmmail-list] Filter for adding Return Receipt header

Paul Ratcliffe pmmail-list@blueprintsoftwareworks.com
Wed, 07 Mar 2001 01:18:32 +0000 (GMT)


On Mon, 26 Feb 2001 11:01:50 -0500 (EST), Steve Richards wrote:
>
>>->You can do this by using a Message Send Rexx Exit.
>>
>>You wouldn't have one would you ?

OK, here it is. This filter adds a return receipt line to any message
that passes through it. You must configure your email address in it
before using it, otherwise you won't get any receipts!


/* REXX Message Send exit to add return receipt request to all messages */
/* Configure the email address to use for the receipts on the next line */
email = 'user@domain'
/**/
arg file
inhdr = 1
i = 0
modflag = 0
gotrr = 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 do
      inhdr = 0
      if gotrr = 0 then do
	line.i = 'Return-Receipt-To:' email
	i = i + 1
	line.0 = i
	line.i = ''
	modflag = 1
      end
    end; else if left(line.i, 18) = 'Return-Receipt-To:' then
      gotrr = 1
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

- 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
---------------------------------------------------------------------