I need to know if the internet incoming email of a specific mail in database is:
MIME only (arrived straight from the internet to a specific mail in db) or
if the incomming internet email has been received by a Lotus Notes user who forwarded this message to the specific mail in db (therefore the email now has a very different structure) and I will still need to recover the MIME information that is attached to the bottom o the email.
I would need this code in Java, but Lotus Script would help me with the logic.
Subject: This is the 1st part of the code, for the 2nd it has still been hard to find some reliable source of information
public int getLotusNotesEmailTpe (lotus.domino.Document ndocCurr) { int emailType = 0;
//
try { //Check email track
if (ndocCurr.hasItem(“$NoteHasNativeMIME”)) { //Check if email has MIME
if (ndocCurr.getItemValueString("$NoteHasNativeMIME").equals("1")) {
emailType = EMAILMIME; //This email has MIME, has been sent straight to the mail box
}
} else { //Check if message was in MIME format at one point
if (ndocCurr.hasItem("$MIMETrack")) { //Check if email had MIME before
//some code still needed here to see if MIME needs to be parsed and it has been fwd by the notes user just now or not
//2nd part comes here… not developed yet
emailType = EMAILFWDWITHMIME;
} else { //Message came from a Lotus Notes mail box and never had MIME before
emailType = EMAILFNOTESONLY;
}