0 votes
by (120 points)
edited

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
by (147k 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.

...