Home
RECOMMENDED FOR YOU:
SMS Gateway software
Ozeki brings you outstanding
SMS Gateway technology. Use our SMS Server products on Windows,Linux, or Android

C# SMS API
Developers can use our C# SMS API to send SMS from C#.Net. The C# SMS API comes with full source code

PHP SMS API
The ozeki PHP SMS gateway software can be used to send SMS from PHP and to receive SMS usig PHP on your website

SMPP SMS Gateway
SMS service providers use our SMPP gateway solution, that offers a high performance SMPP server and SMPP client gateway with amazing routing capabilities

C# SMS API - onMessageDeliveredToHandset

This event is invoked by the SMS Gateway when the SMS is received on the destination mobile phone. The SMS delivered to handset notification is sent from the network to the system in a separate SMS message. This event happens some time after the SMS delivered to network event occurs. The time depends on when the destination mobile phone becomes available. If the destination phone is never switched off it might never arrive.

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

public delegate void DeliveryEventHandler(string messageID, DateTime deliveryTime);

And the following event is accessed:

public event DeliveryEventHandler onMessageDeliveredToHandset;

     Name Description
void onMessageDeliveredToHandset( string messageID, DateTime deliveryTime);

Create a function with this header and attach it to the onMessageDelivedToHandset event to receive notifications about message delivery to handset events.

Parameters

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

deliveryTime - The timestamp that is returned by the SMS service provider about the delivery

Example

Step 1. - Create the event handling function:

   void myDeliveredToHandsetHandler(string messageID, DateTime
   deliveryTime)
   {
     console.writeln("The message is delivered to the handset");
   };
   

Step 2. - Attach this event to the SMSClient object:

mySMSClient.onMessageDeliveredToHandset += 
ServerEventSink.wrap(myDeliveredToHandsetHandler);
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