How can I create an agent to notify e-mail senders that my domain has changed names?

I am using Lotus Notes R5. My domain name was xxx.com and all my Internet mails were coming to firstname_lastname@xxx.com. Now my domain is changed to yyy.com. (I have kept 10 days open for both the domains.) I would like to create an agent to users' PC by which users who would send me mails from the outside world will get the following message: "My Internet address is changed to First_Name@yyy.com." This should be restricted to the people who are local mail server users. How can I do this?
Haven't tried this code myself, but it seems you could write a scheduled agent in the users' mail files to run "after mail received", as follows:
recipients := @Lowercase(SendTo : CopyTo : BlindCopyTo); mailfileOwner := @Lowercase (@ReplaceSubstring(@Name ([cn]; @GetProfileField("CalendarProfile"; "Owner")); " "; "_")); SELECT @Contains(recipients; mailfileOwner + "@xxx.com"); "@xxx.com"); @MailSend(From; ""; ""; "Change of address for " + mailfileOwner + "@xxx.com"; "My Internet address is changed to " + mailfileOwner + "@yyy.com.")
This would need to be enabled by each user, so it may not be appropriate for a large company. There are probably more sophisticated solutions available from partners (e.g., to intercept the e-mails on your e-mail server as they are received).

This was first published in May 2003