#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.5.4 (beta)
 Author:         Cartan12

 Script Function:
    Beispiel zur Anhang UDF

#ce ----------------------------------------------------------------------------

#include <POP3.au3>
#include <File.au3>
#include <Anhang.au3>

$conn = _POP3Connect($benutzer,$pass,$popserver)
If $conn == 0 Then
    MsgBox(0,"","Keine Verbindung")
Else
	$mails = _POP3Info()
	If $mails <> 0 Then
		$mail = _downloadmail() ; Neue Funktion - Keines Auswahlmenü der Vorhandenen E-Mails
		_FileCreate(@DesktopDir & "\mail.txt")
		FileWrite(@DesktopDir & "\mail.txt",$mail)
		$anhang = _getanhang($mail)
		_ArrayDisplay($anhang)
		If $anhang <> "" Then
			_FileCreate(@DesktopDir & "\" & $anhang[1])
			FileWrite(@DesktopDir & "\" & $anhang[1],$anhang[0])
		EndIf
	EndIf
EndIf



