Nothing worked. I'm trying to help my friend whose requirement I've posted here. Also, I have an idea like this. Store a set of mail ids in a texteditor and read from the file pass it as an input to mail command.