How to implement message delivery reporting using smack

how do i recieve message delivery report using smack api plz help me

I realize this is a very old post but I just hit this problem as well and I don’t know if I should open a new thread or not.

Anyway, I also need to receive a DLR (delivery report) with smack. So far what I have done is use a PacketListener:

this.connection.addAsyncPacketListener(new PacketListener() {

@Override

public void processPacket(Stanza stanza) throws NotConnectedException {

System.out.println(stanza);

}}, null);

But from what I’m seeing, all I get is a correlator message and not the DLR itself. Note that I’m using smack 4.1.0 and my server is an ejabberd server. If anyone has any ideas on how to solve this it would be greatly appreciated.

I recommend having a look at the "Message Delivery Receipts’ API of Smack.