* in TO then CC then BCC order.
* Checks all the likely chunks in search of the addresses.
*/
public String[] getRecipientEmailAddressList() throws ChunkNotFoundException {
if(recipientChunks == null || recipientChunks.length == 0) {
throw new ChunkNotFoundException("No recipients section present");
}
String[] emails = new String[recipientChunks.length];
for(int i=0; i<emails.length; i++) {
RecipientChunks rc = recipientChunks[i];
String email = rc.getRecipientEmailAddress();
if(email != null) {
emails[i] = email;
} else {
if(returnNullOnMissingChunk) {
emails[i] = null;
} else {
throw new ChunkNotFoundException("No email address holding chunks found for the " + (i+1) + "th recipient");
}
}
}
return emails;