Ozeki NG SMS Gateway logo OZEKI NG SMS Gateway
"The World's most reliable SMS gateway software!"

OZEKI NG SMS Gateway - Product Guide

SMS delivery report Contents | SearchSMS received

Home > Product Manual > Developers Guide > C Sharp SMS API > SMS API functions > SMS delivery failed

 


Contact Us!
If you wish to get further information, do not hesitate to contact us!

E-mail: info@ozekisms.com

If you have a technical question, please submit a support request on-line.

C# SMS API - onMessageDeliveryFailed

This event is invoked by the SMS Gateway if the SMS is not accepted by the network for delivery or the network returns a delivery report with negative statuscode meaning that the message could not be delivered.

To handle this event, the following delegate type is used:

public delegate void FailureEventHandler(string messageID, int errorCode, string errorMessage, DateTime errorTime);

And the following event is used:

public event FailureEventHandler onMessageDeliveryFailed;

     Name Description
void onMessageDeliveryFailed( string messageID, int errorCode, string errorMessage, DateTime errorTime );

Create a function with this header and attach it to the onMessageDeliveryFailed event to receive notifications about message delivery failures.

Parameters

messageID - The message id that was returned by the SMS Gateway when you have posted the message for sending using the sendMessage method.

errorCode - An integer number describing the reason for delivery failure

errorMessage - The text describing the reason for delivery failure

errorTime - The timestamp that marks the occurence of the event

Example

Step 1. - Create the event handling function:

   void myDeliveryFauilureHandler(string messageID,int errorCode, string errorMessage, DateTime errorTime)
   {
     console.writeln("The message delivery has failed because "+errorMessage);
   };
   
Step 2. - Attach this event to the SMSClient object:

   mySMSClient.onMessageDeliveryFailed += ServerEventSink.wrap(myDeliveryFauilureHandle);
   
Hint: Notice the ServerEventSink.wrap method, that is used to attach the event. This wrapper is used to work around an error that can happen when asynchronous callbacks are invoked in .NET remoting.

More information





Next page: SMS received
Copyright © 2000- - Ozeki Ltd | info@ozeki.hu
Home > Product Manual > Developers Guide > C Sharp SMS API > SMS API functions > SMS delivery failed
Legal | Privacy | Terms of use | 2364
3.235.137.159 | 87.229.102.173 | Login