AccountService.GetSentMessages limited to 100 messages?

Help with the Esendex API

AccountService.GetSentMessages limited to 100 messages?

Postby BillFR » Tue Oct 19, 2010 2:45 pm

Hello,

I am trying to retrieve the whole list of messages sent from an Esendex account on a given month/day, through the GetSentMessages method of the AccountService class.

As far as I can see (from VB.Net 2008), the method only returns 100 messages, while I can see several hundreds of messages in our customer's Esendex management page, Echo > Sent Items > Sent Messages.

Module Module1
Sub Main()
Dim myAccountService As New WS_AccountService.AccountServiceSoapClient
Dim myMessengerHeader As New WS_AccountService.MessengerHeader
Dim myMessages() As WS_AccountService.message
Dim iMessageLimit As Integer
Dim iNbMessages As Integer

myMessengerHeader.Username = "xxx"
myMessengerHeader.Password = "yyy"
myMessengerHeader.Account = "zzz"

iMessageLimit = myAccountService.GetMessageLimit(myMessengerHeader)
myMessages = myAccountService.GetSentMessages(myMessengerHeader, 2010, 10)
iNbMessages = myMessages.GetLength(0)
End Sub
End Module


Is this a known limitation?
Is there a workaround?

Thanks in advance for sharing your own experience in the matter.

Regards,

GB
BillFR
 
Posts: 2
Joined: Tue Oct 19, 2010 2:35 pm

Re: AccountService.GetSentMessages limited to 100 messages?

Postby Leanne » Mon Oct 25, 2010 4:16 pm

Hi,

The AccountService.GetMessages will currently only retrieve a total of 100 messages. A way around this would be to use the InboxService2 at the location https://www.esendex.com/secure/messenge ... vice2.asmx and use the GetLatestMessages operation. You can then store the highest lastMessageIndex of messages you have processed and use that to get the next 100 messages.

Another solution for you would be to use our Account Event Handler which will post Notifications through a webservice you host. It is a way of allowing our system to notify your applications of activity on your account, for example the arrival of new messages in your Inbox or notification that a message has been delivered. You can find out more about the Account Event Handler below:

http://www.esendex.co.uk/Developers/Con ... nt-Handler

https://www.esendex.com/secure/messenge ... ndler.asmx

Many thanks,
Leanne
 
Posts: 104
Joined: Thu Mar 04, 2010 12:35 am


Return to API



cron
© Esendex Ltd 2010
Company Registration Number: 04217280