+1 vote

And other problem is that

For Each uid As Long In client.Search(Flag.Unseen)
    Dim email As IMail = New MailBuilder().CreateFromEml( _
        client.GetHeadersByUID(uid))
    Log &= vbCrLf & (email.Subject)

    Dim Count = email.Attachments.Count
    For Each mime As MimeData In email.Attachments

    Next  
Next        

Count is always "0" and clearly this email has files.

by

1 Answer

0 votes
 
Best answer

The problem is on the 3rd line.

Imap.GetHeadersByUID downloads email headers only - use Imap.GetMessageByUID method. This way you'll download entire email message.

by (297k points)
...