C# SMS API submit failed
The SMS submit failed event is triggered in the C# SMS API when the Ozeki SMS gateway receives a negative submit report from the SMS service provider. This SMS submit error can also happen, if the SMS cannot be submitted do to the mobile network, for example if an SMPP client connection cannot connect, or if the mobile phone plan runs out of money and you use the Android SMS gateway.
The C#/.Net SMS api sms submit failed event
The sms submit failed event in the C# SMS api is fired when the sms cannot be delivered from the SMS outbox message queue of the SMS gateway to the mobile network, or when the mobile network return a submit failed SMS submit report.
To handle the OnMessageAcceptedForDelivery event in the C# SMS API use these steps:
- Sign up for the OnMessageSubmitFailed event in the C# SMS api
- Write the event handler, that will process the event when the SMS submission failure is reported by the Ozeki SMS Gateway
- Use the sms messages ID to identify the SMS that this error report belongs to
C# sms api sms submit failed example:
Client.OnMessageSubmitFailed += Client_OnMessageSubmitFailed; static void Client_OnMessageSubmitFailed(object sender, OzxArgs< string, DateTime, string > e) { Console.WriteLine("Message submit failed. ID: " + e.Item1 + " Date: " + e.Item2+" Reason: "+e.Item3); }
The SMS Server will call this SMS Submit failed event after it called the SMS accepted for delivery event. Both of these events are triggered by an OZX pdu sent to the C# SMS API after the SMS was submitted by calling the C# SMS API send sms method. The event handler will receive the SMS message ID, and the error messages returned by the mobile network.
More information
- How to send SMS from C#
- Receive SMS in C#
- C# SMS API connect to send SMS
- C# SMS API - disconnect from SMS gateway
- C# SMS API - keepalive SMS connection alive
- C# SMS API - send a text message
- C# SMS API - SMS accepted for deliery event
- C# SMS API - SMS not accepted for delivery
- C# SMS API - submited
- C# SMS API - submit failed
- C# SMS API - delivery report successful
- C# SMS API - delivery failed report
- C# SMS API - alphanumeric sender ID
- C# SMS API how to use short code as sender ID
- C# SMS API text message class