POP_DownloadCompleted:
POP_DownloadCompleted (Success As Boolean, MessageId As Int, MessageText As String)
'--------------------------------------------
' Fired when pop.DownloadMessage is finished
'--------------------------------------------
Dim emsg As Message
Try
If Success = False Then
WriteLog("Failed in POP_DownloadCompleted due to " & LastException.Message)
Else
emsg = MailParser.ParseMail(MessageText, File.DirDefaultExternal & "/" & Misc.usrfolder)
Dim attfile As String
attfile = emsg.Attachments.Get(0) ' ** Code fails at this point!!!!
'do anything with this attachment.................
End If
pop.Close
Catch
WriteLog("POP_DownloadCompleted failed " & LastException.Message)
pop.Close
End Try
End Sub
I just want to save an attached file to a certain folder using the POP library. Refer to line "**" where code fails.
In Outlook I have prepared a small email and attachhed a simple textfile to it.
While debugging the brakpoint at ** tells me, that there is no attachment at all.