MessageStatus Event

This event is fired upon receipt of a message.

Syntax

public event OnMessageStatusHandler OnMessageStatus;

public delegate void OnMessageStatusHandler(object sender, SmppMessageStatusEventArgs e);

public class SmppMessageStatusEventArgs : EventArgs {
  public string MessageId { get; }
  public int MessageState { get; }
  public int MessageError { get; }
  public string FinalDate { get; }
}
Public Event OnMessageStatus As OnMessageStatusHandler

Public Delegate Sub OnMessageStatusHandler(sender As Object, e As SmppMessageStatusEventArgs)

Public Class SmppMessageStatusEventArgs Inherits EventArgs
  Public ReadOnly Property MessageId As String
  Public ReadOnly Property MessageState As Integer
  Public ReadOnly Property MessageError As Integer
  Public ReadOnly Property FinalDate As String
End Class

Remarks

When a CheckMessageStatus is called, the SMPP component will fetch the status of the message represented by MessageId from the server, parse the response and fire MessageStatus.

MessageState represents the last known state the message was left in on the SMPPServer. This code is version specific. For v3.4:

1ENROUTE, the message is in enroute state.
2DELIVERED, the message is delivered.
3EXPIRED, the message validity period expired.
4DELETED, the message has been deleted.
5UNDELIVERABLE, the message is undeliverable.
6ACCEPTED, the message has been read on behalf of subscriber by customer service.
7UNKNOWN, the message is in invalid state.
8REJECTED, the message is in a rejected state.

For v5.0:

0SCHEDULED, the message is in scheduled for delivery, but has not yet been delivered.
1ENROUTE, the message is in enroute state.
2DELIVERED, the message is delivered.
3EXPIRED, the message validity period expired.
4DELETED, the message has been deleted.
5UNDELIVERABLE, the message is undeliverable.
6ACCEPTED, the message has been read on behalf of subscriber by customer service.
7UNKNOWN, the message is in invalid state.
8REJECTED, the message is in a rejected state.
9SKIPPED, the message was accepted by not delivered.

MessageError will contain an error code representing any failure encountered during message delivery. This code may be vendor-specific.

FinalDate contains a human-readable string representing the date on which the message was delivered. If the message was not delivered, this parameter will be empty.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 .NET Edition - Version 20.0 [Build 8307]