/* DeleteRead.rexx - Deletes read messages from current folder */ options results call addlib('rexxsupport.library',0,-30,0) delete_these='ORSS' /* O=Old, R=Replied, N=New, U=Unread, S=Sent */ rem_del='NO' /* If set to yes, messages will be removed automatically */ address 'YAM' 'GetFolderInfo Max' n=result do m=0 to n-1 'SetMail' m 'GetMailInfo Status' if pos(result,delete_these)>0 then if upper(rem_del)='YES' then do 'GetMailInfo File' call delete(result) end else 'MailDelete' end if upper(rem_del)='YES' then 'MailUpdate' exit