In a workflow app hpw to check if the person who gets an email is still working in the company or not

I have a workflow application. What i want to implement is when a user clicks on submit button to send the document to another level or workflow, the script should check if the user who is supposed to get an email is still in the company or not. If the user is not working in the company, then the script should take another name from the configration document and send him/her the email instead.Is this possible?

Thanks,

Subject: code it?

have the code in the submit button check the domino directory for the name, if found then use it otherwise pick the other name from your config document