Java Mail API



  • Hallo ich hab nach dem Buch "Java ist auch eine Insel" versucht ein simples Mailing Programm zu schreiben. Ich habe mehrere Fragen dazu:
    1. Wenn ich eine Mail von anderem Account schicke bekomme ich sowas:

    DEBUG: setDebug: JavaMail version 1.4.1
    DEBUG: getProvider() returning javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]
    DEBUG POP3: connecting to host "pop3.web.de", port 110, isSSL false
    S: +OK WEB.DE POP3-Server
    C: USER ***
    S: +OK Bitte Kennwort eingeben/enter password
    C: PASS ***
    S: +OK Postfach bereit/mailbox locked and ready
    C: STAT
    S: +OK 1 1870
    C: NOOP
    S: +OK
    -------------------------
    Nachricht: 0
    C: TOP 1 0
    S: +OK Nachricht folgt/message follows
    Received: from [IP] (helo=blu0-omc3-s22.blu0.hotmail.com)
    	by mx41.web.de with esmtp (WEB.DE 4.109 #226)
    	id 1KsM6l-0005yj-00
    	for ***; Tue, 21 Oct 2008 20:37:31 +0200
    Received: from BLU106-W59 ([IP]) by blu0-omc3-s22.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
    	 Tue, 21 Oct 2008 11:36:50 -0700
    Message-ID: <BLU106-W594359ECEEA7EB76886567C62E0@phx.gbl>
    Content-Type: multipart/alternative;
    	boundary="_68e3fc76-dd33-4ff8-b100-c4aed5f62a39_"
    X-Originating-IP: [IP]
    From: <***>
    To: <***>
    Subject: Test
    Date: Tue, 21 Oct 2008 18:36:50 +0000
    Importance: Normal
    MIME-Version: 1.0
    X-OriginalArrivalTime: 21 Oct 2008 18:36:50.0611 (UTC) FILETIME=[FB590830:01C933AB]
    Sender: ***
    
    [IN MEINEM PROGRAMM:]
    Von: [***]
    Betreff: Test
    Gesendet am: Tue Oct 21 20:36:50 CEST 2008
    ContentType: multipart/alternative; 
    	boundary=_68e3fc76-dd33-4ff8-b100-c4aed5f62a39_
    C: QUIT
    S: +OK
    

    aber wo steht der Text dazu?
    2. Frage im Text stehen viele IP´s. Welche sind das alles?
    3. Kann ich den Text im JavaMailAPI Debug Modus irgenntwie in einen String etc. schreiben um ihn später anzeigen zukönnen?
    4.

    Properties props = new Properties(); 
            props.setProperty( "mail.pop3.host", "pop3.web.de" ); 
            props.setProperty( "mail.pop3.user", "***"); 
            props.setProperty( "mail.pop3.password", "***"); 
            //props.setProperty( "mail.pop3.port", "995" ); 
            props.setProperty( "mail.pop3.auth", "true" ); 
            //props.setProperty( "mail.pop3.socketFactory.class", "javax.net.ssl.SSLSocketFactory" );
    

    Was bedeuten diese Eigenschaften und gibt es noch mehrere davon?

    Sorry für alle diese Fragen konnte dazu noch keine Antwort finden
    Schonmal danke!!! 👍

    P.S Von hier ist der Code: http://www.sws.bfh.ch/~amrhein/Swing/javainsel7/javainsel_17_012.htm




Anmelden zum Antworten