First, urgent is from your point-of-view only. Personally, I am not concerned in the slightest. That having been said, were I in your shoes, I would be concerned indeed.
The 'requirements' you have given are far too vague. What is the actual problem you are experiencing. If you have an aspect of your design that is stumping you, post a concise question. If you are running into a runtime error, post the stack trace and say where you are stuck. No one is going to write an application for you. If you want that go to http://www.rentacoder.com
- Saish
The String class has a split() method that you can use in this case.
String[] toarray = to.split(",");
for(int i = 0; i < toarray.length; i++){
String tovalue = toarray[i].trim();
// do something with the tovalue
}