Getting the values from internet email fields

I need to read incoming internet emails that arrive in a Lotus Notes database and send this data to another repository that will store these emails.

These emails have a MIME format, so I am trying to read these emails using the following code:

Item item = ndocCurr.getFirstItem(sFieldName);

 switch (item.getType()) {

 case Item.ACTIONCD : type = "Action CD"; break;

…

 default : type = "Other";

 }

if (type==FIELDTEXT)

sTmpValue = ndocCurr.getItemValueString(sFieldName);

else if (type==FIELDDATETIME)

sTmpValue = item.getDateTimeValue().getLocalTime();

else {

sTmpValue = ndocCurr.getItemValueString(sFieldName); //Check if there is a better solution

}

but then I realised that all fields have Data Type = RFC822 Text, therefore my “type” variable was always set to “Other” and it does not works for Dates and Text fields as they require different routines to get its values.

Would you know a better way of getting the values from each email field?

Note: This has to be in Java.

Tx.