Vb.net Mail Attachment
Hallo, ich versuche den Anhang einer Mail zu speichern.
POPCLI = POP3-Client , MIMMAS = Aktuelle Mailmassage, Integer A = Zahl der Massage:
Dim MIMMAS As MIMEParser.Message = POPCLI.GetMessage(A, False)
Danke schonmal im vorraus für jede Hilfe!
Grüße waldgnarf
Dim MIMMAS As MIMEParser.Message = POPCLI.GetMessage(A, False)
If MIMMAS.Attachments.Count > 0 Then
For Z As Integer = 1 To MIMMAS.AttachmentCount
Dim ATTACH As MIMEParser.Attachment = MIMMAS.GetAttachment(Z)
Dim FSFCAS As FileStream = File.Create("C:/" & ATTACH.ContentFileName)
'hier kommt der Fehler: Directory not found Exeption was unhandled
'Could not find a part of the path 'C:\'.
Dim ATTDEC() As Byte
ATTDEC = ATTACH.DecodedAttachment
FSFCAS.Write(ATTDEC, 0, ATTDEC.Length)
MsgBox("'" & ATTACH.ContentFileName & "' wurde gespeichert!")
FSFCAS.Close()
Next
End If
Danke schonmal im vorraus für jede Hilfe!
Grüße waldgnarf
Please also mark the comments that contributed to the solution of the article
Content-Key: 142996
Url: https://administrator.de/contentid/142996
Printed on: April 19, 2024 at 10:04 o'clock
1 Comment