Some dead messages are important to your company and cannot just be deleted. Here's an easy way to redirct them and alert the intended recipient to have the problem corrected.
We often get important messages that go dead in the mail box because the sender mistyped the email address. Rather than delete them, we try to pass them on to the intended recipient where possible. I wrote this little code snippet to make the process easier.
Create this code as a smart icon button. That way it doesn't alter the design of the mail.box and will be available no matter what server you access. If the address to redirect to is not in your address book, just click OK to the picklist and enter it manually in the prompt that follows (useful for sending to alias names).
The code will also offer to send a note to the recipient asking that they contact the sender and have their address corrected.
FIELD FailureReason:=""; FIELD DeadFailureReason:=""; FIELD RoutingState:=""; origSendTo:=SendTo; FIELD Sendto:=@Name([CN];@PickList( [Name] )); FIELD SendTo:=@Prompt([OKCANCELEDIT]; "Enter Address"; "Enter Address";Sendto); FIELD Recipients:=Sendto; warn:=@Prompt([YESNO];"Send Correction Notice";"Do you want to send a notice to the recipient to contact the author with their correct address?"); msg:= "The message you received from: " + @Name([CN];FROM) + " with subject: '" + subject + "' was addressed incorrectly to " + origSendTo + " and required administrator intervention to correct. Please contact the sender with your correct email address."; sig:=@NewLine+@NewLine+"Thank you,"+ @NewLine+"Company XYZ Email Administration"; @If(warn=1;@MailSend( sendTo ; "" ; "" ; "Email address correction needed" ;msg + sig; "" );"")