String strFrom = (String)ht.get("FROM");
if(strFrom.indexOf("<") >= 0){
strFrom = strFrom.substring(strFrom.indexOf("<") + 1, strFrom.indexOf(">"));
}
Address from = new Address(strFrom.trim(), " ");
msg.setFrom(from);
}
// FIXME: What if there is more than one To: ??
if ((String)ht.get("TO") != null) {
String strTo = (String)ht.get("TO");
if (strTo.indexOf("<") >= 0) {
strTo = strTo.substring(strTo.indexOf("<") + 1, strTo.indexOf(">"));
}
Address to[] = new Address[1];
to[0] = new Address(strTo.trim(), " ");
msg.addRecipients(Message.RecipientType.TO, to);
}
/*
while (strTo.indexOf("<") >= 0) {