MimeMessage mm = mail.getMessage();
int count = 0;
for (Enumeration e = mm.getAllHeaders(); e.hasMoreElements();) {
Header hdr = (Header)e.nextElement();
if (hdr.getName().equals(RFC2822Headers.RECEIVED)) {
count++;
}
}
if (count >= limit) {
return mail.getRecipients();
} else {
return null;
}