public static String buildCpimDeliveryReport(String from,String to,String imdn,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+ ": "+ IdGenerator.generateMessageID()+ CRLF+ CpimMessage.HEADER_DATETIME+ ": "+ DateUtils.encodeDate(timestampSent)+ CRLF+ CRLF+ CpimMessage.HEADER_CONTENT_TYPE+ ": "+ ImdnDocument.MIME_TYPE+ CRLF+ CpimMessage.HEADER_CONTENT_DISPOSITION+ ": "+ ImdnDocument.NOTIFICATION+ CRLF+ CpimMessage.HEADER_CONTENT_LENGTH+ ": "+ imdn.getBytes(UTF8).length+ CRLF+ CRLF+ imdn;
}

public static String buildCpimDeliveryReport ( String from , String to , String imdn , 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 + ": " + IdGenerator . generateMessageID ( ) + CRLF + CpimMessage . HEADER_DATETIME + ": " + DateUtils . encodeDate ( timestampSent ) + CRLF + CRLF + CpimMessage . HEADER_CONTENT_TYPE + ": " + ImdnDocument . MIME_TYPE + CRLF + CpimMessage . HEADER_CONTENT_DISPOSITION + ": " + ImdnDocument . NOTIFICATION + CRLF + CpimMessage . HEADER_CONTENT_LENGTH + ": " + imdn . getBytes ( UTF8 ) . length + CRLF + CRLF + imdn ; }
build a cpim delivery report
