Receive SMS with C++

Receive Interface

InboxService2 interface

Contains functions and methods that enable you to work with your Esendex Inbox.

Implemented by Inbox2 class

EsendexLib::SendService2 spInboxService; spInboxService.CreateInstance(uuidof(EsendexLib::InboxService2)); 

Initialise method

Initialise the class with your Esendex credentials. You must call this method before you call any other on the interface.

Initialise(_bstr_t Username, _bstr_t Password, _bstr_t Account, _variant_t IsServerSide); 

Parameters

  • Username Your Esendex username.
  • Password Your Esendex password.
  • Account Your Esendex Account Reference.
  • IsServerSide (optional) True if the component is running within an ASP page; false or otherwise. The default is false.

GetMessages function

Retrieves Messages from your Esendex Inbox.

IObjectCollectionPtr GetMessages();

Return Value: A collection of Messages contained in your Esendex Inbox.

GetMessageByID function

Retrieves a Message from your Esendex Inbox.

ISMSMessage2Ptr GetMessageByID(_bstr_t MessageID);

Parameters

  • MessageID The Id of the Message you want to retrieve.
  • Return Value: A Message from your Esendex Inbox.

GetMessagesForDay function

Retrieves Messages from your Esendex Inbox for a given day.

IObjectCollectionPtr GetMessages(long Year, long Month, long Day);

Parameters

  • Year, Month, Day The year, month and day of the Messages to retrieve.
  • Return Value: A collection of Messages contained in your Esendex Inbox.

GetMessagesForDateRange function

Retrieves Messages from your Esendex Inbox for a given date range.

IObjectCollectionPtr GetMessages(Date StartDate, Date EndDate);

Parameters

  • StartDate The inclusive date of the earliest Message to retrieve.
  • EndDate The inclusive date of the latest Message to retrieve.
  • Return Value: A collection of Messages contained in your Esendex Inbox.

GetMessagesByID function

Retrieves Messages from your Esendex Inbox.

IObjectCollectionPtr GetMessagesByID(_bstr_t MessageIDs);

Parameters

  • MessageIDs A comma-separated list containing the Ids of the Messages you want to retrieve.
  • Return Value: A collection of Messages contained in your Esendex Inbox.

DeleteMessage method

Deletes a Message from your Esendex Inbox.

DeleteMessage(_bstr_t MessageID);

Parameters

  • Message The Id of the Message you want to delete.

DeleteMessages method

Deletes multiple Messages from your Esendex Inbox.

DeleteMessage(_bstr_t MessageIDs);

Parameters

  • Messages A comma-separated list containing the Ids of the Messages you want to delete.