public static String buildImdnDeliveryReport(String msgId,ImdnDocument.DeliveryStatus status,long timestamp){
  String method;
switch (status) {
case DISPLAYED:
    method="display-notification";
  break;
case DELIVERED:
method="delivery-notification";
break;
default :
method="processing-notification";
break;
}
return "<?xml version=\"1.0\" encoding=\"" + UTF8_STR + "\"?>"+ CRLF+ "<imdn xmlns=\"urn:ietf:params:xml:ns:imdn\">"+ CRLF+ "<message-id>"+ msgId+ "</message-id>"+ CRLF+ "<datetime>"+ DateUtils.encodeDate(timestamp)+ "</datetime>"+ CRLF+ "<"+ method+ "><status><"+ status+ "/></status></"+ method+ ">"+ CRLF+ "</imdn>";
}

public static String buildImdnDeliveryReport ( String msgId , ImdnDocument . DeliveryStatus status , long timestamp ) { String method ; switch ( status ) { case DISPLAYED : method = "display-notification" ; break ; case DELIVERED : method = "delivery-notification" ; break ; default : method = "processing-notification" ; break ; } return "<?xml version=\"1.0\" encoding=\"" + UTF8_STR + "\"?>" + CRLF + "<imdn xmlns=\"urn:ietf:params:xml:ns:imdn\">" + CRLF + "<message-id>" + msgId + "</message-id>" + CRLF + "<datetime>" + DateUtils . encodeDate ( timestamp ) + "</datetime>" + CRLF + "<" + method + "><status><" + status + "/></status></" + method + ">" + CRLF + "</imdn>" ; }
build a delivery report
