error on GetMailMessage

0 votes
asked Aug 19, 2010 by Sander (120 points)
edited Aug 19, 2010

Hi,

I am using rebex mail for a while now, but get an error when using getmailmessage. I only get this error on messages containing two attachments with the same name.

How can i solve this eror?

Kind regards.

Code:

    Dim message As MailMessage
    Dim popclient As Pop3
    Dim colMessages As Pop3MessageCollection

    popclient = New Pop3

    colMessages = New Pop3MessageCollection

    popclient.Connect("xxxxx")
    popclient.Login("xxxxx", "xxxxx")

    colMessages = popclient.GetMessageList(Pop3ListFields.SequenceNumber)

    For Each oMessage As Pop3MessageInfo In colMessages
        message = popclient.GetMailMessage(oMessage.SequenceNumber)
        MsgBox(message.From)
    Next

Error:

System.FormatException was unhandled Message=Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

Applies to: Rebex Secure Mail

1 Answer

0 votes
answered Aug 19, 2010 by Lukas Pokorny (103,130 points)

Would it be possible to download the message into a file using popclient.GetMessage mehod and mail it to us (support@rebex.net) for analysis? It looks like two attachments of the same name is not enough to trigger an error, so there might be some other problem as well.

Alternatively, send us the full stack trace of this exception (the result of Exception object's ToString method is preferred), that should make it possible to locate the source of the problem.

...