public static String buildCpimMessageWithImdn(String from,String to,String messageId,String content,String contentType,long timestampSent){
  return CpimMessage.HEADER_FROM + ": " + formatCpimSipUri(from)+ CRLF+ CpimMessage.HEADER_TO+ ": "+ formatCpimSipUri(to)+ CRLF+ CpimMessage.HEADER_NS+ ": "+ ImdnDocument.IMDN_NAMESPACE+ CRLF+ ImdnUtils.HEADER_IMDN_MSG_ID+ ": "+ messageId+ CRLF+ CpimMessage.HEADER_DATETIME+ ": "+ DateUtils.encodeDate(timestampSent)+ CRLF+ ImdnUtils.HEADER_IMDN_DISPO_NOTIF+ ": "+ ImdnDocument.POSITIVE_DELIVERY+ ", "+ ImdnDocument.DISPLAY+ CRLF+ CRLF+ CpimMessage.HEADER_CONTENT_TYPE+ ": "+ contentType+ ";charset="+ UTF8_STR+ CRLF+ CpimMessage.HEADER_CONTENT_LENGTH+ ": "+ content.getBytes(UTF8).length+ CRLF+ CRLF+ content;
}

public static String buildCpimMessageWithImdn ( String from , String to , String messageId , String content , String contentType , long timestampSent ) { return CpimMessage . HEADER_FROM + ": " + formatCpimSipUri ( from ) + CRLF + CpimMessage . HEADER_TO + ": " + formatCpimSipUri ( to ) + CRLF + CpimMessage . HEADER_NS + ": " + ImdnDocument . IMDN_NAMESPACE + CRLF + ImdnUtils . HEADER_IMDN_MSG_ID + ": " + messageId + CRLF + CpimMessage . HEADER_DATETIME + ": " + DateUtils . encodeDate ( timestampSent ) + CRLF + ImdnUtils . HEADER_IMDN_DISPO_NOTIF + ": " + ImdnDocument . POSITIVE_DELIVERY + ", " + ImdnDocument . DISPLAY + CRLF + CRLF + CpimMessage . HEADER_CONTENT_TYPE + ": " + contentType + ";charset=" + UTF8_STR + CRLF + CpimMessage . HEADER_CONTENT_LENGTH + ": " + content . getBytes ( UTF8 ) . length + CRLF + CRLF + content ; }
build a cpim message with full imdn headers
