Ein Flag wäre cool und sehr hilfreichRSBasic hat geschrieben: CountMailEx() ist normalerweise unahängig von ExamineMailEx(), aber ich kann da gerne auch Parameter hinzufügen, um die jeweilige Anzahl zu ermitteln.
Das rufe ich ja auch in der ExamineMailEx Schleife auf.RSBasic hat geschrieben: CountMailAttachmentsEx() basiert auf ExamineMailEx():Ich muss mal schauen, wie ich das am besten löse.PB.Ex Hilfe hat geschrieben:Beschreibung: Ermittelt, wie viele Anhänge in der aktuellen E-Mail existieren. Diese Funktion ist nur innerhalb der ExamineMailEx-Schleife gültig.
Code: Alles auswählen
If ExamineMailEx(1, #PBEx_Mail_SeenType_OnlyUnseenMails, #PBEx_Mail_FetchType_OnlyHeaderData, 1, @ErrorOutput$)
Debug "Mails: "
Debug CountMailEx(1, "", @ErrorOutput$)
c.i = 0
While NextMailEntryEx(1, @ErrorOutput$)
MailEntrySubjectEx(1, @Output$, @ErrorOutput$)
Debug "Subject: " + Output$
MailEntryFromEx(1, @Output$, @ErrorOutput$)
Debug "From: " + Output$
MailEntryToEx(1, @Output$, @ErrorOutput$)
Debug "To: " + Output$
Debug "Date: " + FormatDate("%dd.%mm.%yyyy %hh:%ii:%ss", MailEntryDateEx(1, @ErrorOutput$))
c.i + 1
Debug Str(c.i) + " : " + MailIDEx(1, @ErrorOutput$)
Debug "Flag State: " + MailEntryAttributeEx(1, @ErrorOutput$)
c_att.i = CountMailAttachmentsEx(1, @ErrorOutput$)
Debug "Anhänge: " + Str(c_att.i)
If c_att.i > 0
If ExamineMailAttachmentsEx(1, @ErrorOutput$)
While NextMailEntryAttachmentsEx(1, @ErrorOutput$)
If MailEntryAttachmentsFileNameEx(1, @Output$, @ErrorOutput$)
Debug Output$
SaveMailEntryAttachmentsEx(1, "C:\temp\" + Output$, @ErrorOutput$)
EndIf
Wend
EndIf
EndIf
Debug "--------------------------------------------------"
Debug ErrorOutput$
If c.i >= 100 : Break : EndIf
Wend
Debug ErrorOutput$
EndIf
- Morty