通过SMTP连接到outlook.com的Java适用于Hotmail,已停止为Outlook.com工作

时间:2015-09-16 20:56:05

标签: java outlook smtp hotmail smtp-auth

我通过Java和SMTP发送电子邮件给Hotmail。现在我的帐户已移至Outlook.com,它已停止运行。

我的设置:

private String host = "smtp.live.com";
private String port = "587";
private String socketPort = "587";
private boolean tls = true;
private boolean auth = true;

我使用我的帐户name@outlook.com登录。使用与基于WEB的outlook.com相同的密码

错误:

    09-16 22:33:07.655 6491-6491/com.abc.def D/ReceiveSMSMonitor: SMS Message Received.
    09-16 22:33:07.745 6491-16242/com.abc.def I/System.out: DEBUG: JavaMail version 1.4.1ea-SNAPSHOT
    09-16 22:33:07.745 6491-16242/com.abc.def I/System.out: DEBUG: not loading file: /system/lib/javamail.providers
    09-16 22:33:07.746 6491-16242/com.abc.def I/System.out: DEBUG: java.io.FileNotFoundException: /system/lib/javamail.providers: open failed: ENOENT (No such file or directory)
    09-16 22:33:07.748 6491-16242/com.abc.def I/System.out: DEBUG: !anyLoaded
    09-16 22:33:07.750 6491-16242/com.abc.def I/System.out: DEBUG: not loading resource: /META-INF/javamail.providers
    09-16 22:33:07.765 6491-16242/com.abc.def I/System.out: DEBUG: not loading resource: /META-INF/javamail.default.providers
    09-16 22:33:07.765 6491-16242/com.abc.def I/System.out: DEBUG: failed to load any providers, using defaults
    09-16 22:33:07.765 6491-16242/com.abc.def I/System.out: DEBUG: Tables of loaded providers
    09-16 22:33:07.765 6491-16242/com.abc.def I/System.out: DEBUG: Providers Listed By Class Name: {com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc.,1.4.1ea-SNAPSHOT], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc.,1.4.1ea-SNAPSHOT], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc.,1.4.1ea-SNAPSHOT], com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc.,1.4.1ea-SNAPSHOT], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc.,1.4.1ea-SNAPSHOT], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc.,1.4.1ea-SNAPSHOT]}
    09-16 22:33:07.765 6491-16242/com.abc.def I/System.out: DEBUG: Providers Listed By Protocol: {pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc.,1.4.1ea-SNAPSHOT], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc.,1.4.1ea-SNAPSHOT], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc.,1.4.1ea-SNAPSHOT], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc.,1.4.1ea-SNAPSHOT], imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc.,1.4.1ea-SNAPSHOT], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc.,1.4.1ea-SNAPSHOT]}
    09-16 22:33:07.767 6491-16242/com.abc.def I/System.out: DEBUG: not loading resource: /META-INF/javamail.default.address.map
    09-16 22:33:07.768 6491-16242/com.abc.def I/System.out: DEBUG: !anyLoaded
    09-16 22:33:07.770 6491-16242/com.abc.def I/System.out: DEBUG: not loading resource: /META-INF/javamail.address.map
    09-16 22:33:07.770 6491-16242/com.abc.def I/System.out: DEBUG: not loading file: /system/lib/javamail.address.map
    09-16 22:33:07.770 6491-16242/com.abc.def I/System.out: DEBUG: java.io.FileNotFoundException: /system/lib/javamail.address.map: open failed: ENOENT (No such file or directory)
    09-16 22:33:07.770 6491-16242/com.abc.def I/System.out: DEBUG: failed to load address map, using defaults
    09-16 22:33:07.781 6491-16242/com.abc.def I/System.out: DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc.,1.4.1ea-SNAPSHOT]
    09-16 22:33:07.818 6491-16242/com.abc.def I/System.out: DEBUG SMTP: useEhlo true, useAuth true
    09-16 22:33:07.818 6491-16242/com.abc.def I/System.out: DEBUG SMTP: useEhlo true, useAuth true
    09-16 22:33:07.819 6491-16242/com.abc.def I/System.out: DEBUG SMTP: trying to connect to host "smtp.live.com", port 587, isSSL false
    09-16 22:33:08.062 6491-16242/com.abc.def I/System.out: DEBUG SMTP: connected to host "smtp.live.com", port: 587
    09-16 22:33:08.062 6491-16242/com.abc.def I/System.out: EHLO localhost
    09-16 22:33:08.183 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "TURN", arg ""
    09-16 22:33:08.183 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "SIZE", arg "41943040"
    09-16 22:33:08.183 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "ETRN", arg ""
    09-16 22:33:08.183 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "PIPELINING", arg ""
    09-16 22:33:08.183 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "DSN", arg ""
    09-16 22:33:08.183 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
    09-16 22:33:08.183 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "8bitmime", arg ""
    09-16 22:33:08.184 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "BINARYMIME", arg ""
    09-16 22:33:08.184 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "CHUNKING", arg ""
    09-16 22:33:08.184 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "VRFY", arg ""
    09-16 22:33:08.184 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "TLS", arg ""
    09-16 22:33:08.184 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "STARTTLS", arg ""
    09-16 22:33:08.184 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "OK", arg ""
    09-16 22:33:08.184 6491-16242/com.abc.def I/System.out: STARTTLS
    09-16 22:33:08.301 6491-16242/com.abc.def I/System.out: 220 2.0.0 SMTP server ready
    09-16 22:33:08.643 6491-16242/com.abc.def I/System.out: EHLO localhost
    09-16 22:33:08.766 6491-16242/com.abc.def I/System.out: 250-BLU436-SMTP159.smtp.hotmail.com Hello [178.195.137.233]
    09-16 22:33:08.766 6491-16242/com.abc.def I/System.out: 250-TURN
    09-16 22:33:08.766 6491-16242/com.abc.def I/System.out: 250-SIZE 41943040
    09-16 22:33:08.766 6491-16242/com.abc.def I/System.out: 250-ETRN
    09-16 22:33:08.791 6491-16242/com.abc.def I/System.out: 250-PIPELINING
    09-16 22:33:08.796 6491-16242/com.abc.def I/System.out: 250-DSN
    09-16 22:33:08.796 6491-16242/com.abc.def I/System.out: 250-ENHANCEDSTATUSCODES
    09-16 22:33:08.801 6491-16242/com.abc.def I/System.out: 250-8bitmime
    09-16 22:33:08.801 6491-16242/com.abc.def I/System.out: 250-BINARYMIME
    09-16 22:33:08.805 6491-16242/com.abc.def I/System.out: 250-CHUNKING
    09-16 22:33:08.806 6491-16242/com.abc.def I/System.out: 250-VRFY
    09-16 22:33:08.806 6491-16242/com.abc.def I/System.out: 250-AUTH LOGIN PLAIN XOAUTH2
    09-16 22:33:08.810 6491-16242/com.abc.def I/System.out: 250 OK
    09-16 22:33:08.818 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "TURN", arg ""
    09-16 22:33:08.818 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "SIZE", arg "41943040"
    09-16 22:33:08.819 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "ETRN", arg ""
    09-16 22:33:08.819 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "PIPELINING", arg ""
    09-16 22:33:08.819 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "DSN", arg ""
    09-16 22:33:08.819 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
    09-16 22:33:08.819 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "8bitmime", arg ""
    09-16 22:33:08.820 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "BINARYMIME", arg ""
    09-16 22:33:08.820 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "CHUNKING", arg ""
    09-16 22:33:08.820 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "VRFY", arg ""
    09-16 22:33:08.820 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH2"
    09-16 22:33:08.820 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Found extension "OK", arg ""
    09-16 22:33:08.821 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Attempt to authenticate
    09-16 22:33:08.821 6491-16242/com.abc.def I/System.out: AUTH LOGIN
    09-16 22:33:09.811 6491-16242/com.abc.def I/System.out: DEBUG SMTP: use8bit false
    09-16 22:33:09.811 6491-16242/com.abc.def I/System.out: MAIL FROM:<name@outlook.com>
    09-16 22:33:09.937 6491-16242/com.abc.def I/System.out: 250 2.1.0 name@outlook.com....Sender OK
    09-16 22:33:09.938 6491-16242/com.abc.def I/System.out: RCPT TO:<name@outlook.com>
    09-16 22:33:10.059 6491-16242/com.abc.def I/System.out: 250 2.1.5 name@outlook.com 
    09-16 22:33:10.059 6491-16242/com.abc.def I/System.out: DEBUG SMTP: Verified Addresses
    09-16 22:33:10.059 6491-16242/com.abc.def I/System.out: DEBUG SMTP:   name@outlook.com
    09-16 22:33:10.059 6491-16242/com.abc.def I/System.out: DATA
    09-16 22:33:10.180 6491-16242/com.abc.def I/System.out: 354 Start mail input; end with <CRLF>.<CRLF>
    09-16 22:33:10.195 6491-16242/com.abc.def I/System.out: Date: Wed, 16 Sep 2015 22:33:07 +0200 (GMT+02:00)
    09-16 22:33:10.195 6491-16242/com.abc.def I/System.out: From: name@outlook.com
    09-16 22:33:10.195 6491-16242/com.abc.def I/System.out: To: name@outlook.com
    09-16 22:33:10.195 6491-16242/com.abc.def I/System.out: Message-ID: <522685651.7.1442435587781.JavaMail.root@localhost>
    09-16 22:33:10.195 6491-16242/com.abc.def I/System.out: Subject: Sender not in Contacts: +447781470659
    09-16 22:33:10.195 6491-16242/com.abc.def I/System.out: MIME-Version: 1.0
    09-16 22:33:10.195 6491-16242/com.abc.def I/System.out: Content-Type: multipart/mixed; 
    09-16 22:33:10.196 6491-16242/com.abc.def I/System.out:     boundary="----=_Part_6_64153282.1442435587660"
    09-16 22:33:10.196 6491-16242/com.abc.def I/System.out: 
    09-16 22:33:10.196 6491-16242/com.abc.def I/System.out: ------=_Part_6_64153282.1442435587660
    09-16 22:33:10.196 6491-16242/com.abc.def I/System.out: Content-Type: text/plain; charset=UTF-8
    09-16 22:33:10.196 6491-16242/com.abc.def I/System.out: Content-Transfer-Encoding: quoted-printable
    09-16 22:33:10.196 6491-16242/com.abc.def I/System.out: 
    09-16 22:33:10.196 6491-16242/com.abc.def I/System.out: 2580505 als Sicherheitscode f=C3=BCr das Microsoft-Konto verwenden
    09-16 22:33:10.196 6491-16242/com.abc.def I/System.out: 
    09-16 22:33:10.226 6491-16242/com.abc.def I/System.out: ------=_Part_6_64153282.1442435587660--
    09-16 22:33:10.230 6491-16242/com.abc.def I/System.out: .
    09-16 22:33:10.601 6491-16242/com.abc.def I/System.out: DEBUG SMTP: got response code 550, with response: 550 5.3.4 Requested action not taken; To continue sending messages, please sign in to your account.
    09-16 22:33:10.606 6491-16242/com.abc.def I/System.out: RSET
    09-16 22:33:10.612 6491-16242/com.abc.def I/System.out: DEBUG SMTP: EOF: [EOF]
    09-16 22:33:10.613 6491-16242/com.abc.def I/System.out: javax.mail.MessagingException: [EOF]
    09-16 22:33:10.613 6491-16242/com.abc.def I/System.out:     at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1510)
    09-16 22:33:10.618 6491-16242/com.abc.def I/System.out:     at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1541)
    09-16 22:33:10.619 6491-16242/com.abc.def I/System.out:     at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1350)
    09-16 22:33:10.619 6491-16242/com.abc.def I/System.out:     at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:666)
    09-16 22:33:10.625 6491-16242/com.abc.def I/System.out:     at javax.mail.Transport.send0(Transport.java:189)
    09-16 22:33:10.629 6491-16242/com.abc.def I/System.out:     at javax.mail.Transport.send(Transport.java:118)
    09-16 22:33:10.629 6491-16242/com.abc.def I/System.out:     at com.abc.def.mail.MailForward.send(MailForward.java:94)
    09-16 22:33:10.638 6491-16242/com.abc.def I/System.out:     at com.abc.def.ReceiveSMSMonitor.SendEmail(ReceiveSMSMonitor.java:160)
    09-16 22:33:10.638 6491-16242/com.abc.def I/System.out:     at com.abc.def.ReceiveSMSMonitor.access$000(ReceiveSMSMonitor.java:37)
    09-16 22:33:10.638 6491-16242/com.abc.def I/System.out:     at com.abc.def.ReceiveSMSMonitor$1.run(ReceiveSMSMonitor.java:61)
    09-16 22:33:10.638 6491-16242/com.abc.def I/System.out:     at java.lang.Thread.run(Thread.java:818)
    09-16 22:33:10.638 6491-16242/com.abc.def I/System.out: QUIT
    09-16 22:33:10.639 6491-16242/com.abc.def I/System.out: DEBUG SMTP: EOF: [EOF]
    09-16 22:33:10.642 6491-16242/com.abc.def E/ReceiveSMSMonitor: Message exception. Check your details and make sure they are valid. Also check that you can log in to your normal email account.
    09-16 22:33:10.642 6491-16242/com.abc.def E/ReceiveSMSMonitor: javax.mail.MessagingException: [EOF]
    09-16 22:33:10.642 6491-16242/com.abc.def E/ReceiveSMSMonitor:     at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1510)
    09-16 22:33:10.642 6491-16242/com.abc.def E/ReceiveSMSMonitor:     at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1541)
    09-16 22:33:10.642 6491-16242/com.abc.def E/ReceiveSMSMonitor:     at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1350)
    09-16 22:33:10.642 6491-16242/com.abc.def E/ReceiveSMSMonitor:     at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:666)
    09-16 22:33:10.642 6491-16242/com.abc.def E/ReceiveSMSMonitor:     at javax.mail.Transport.send0(Transport.java:189)
    09-16 22:33:10.642 6491-16242/com.abc.def E/ReceiveSMSMonitor:     at javax.mail.Transport.send(Transport.java:118)
    09-16 22:33:10.642 6491-16242/com.abc.def E/ReceiveSMSMonitor:     at com.abc.def.mail.MailForward.send(MailForward.java:94)
    09-16 22:33:10.642 6491-16242/com.abc.def E/ReceiveSMSMonitor:     at com.abc.def.ReceiveSMSMonitor.SendEmail(ReceiveSMSMonitor.java:160)
    09-16 22:33:10.642 6491-16242/com.abc.def E/ReceiveSMSMonitor:     at com.abc.def.ReceiveSMSMonitor.access$000(ReceiveSMSMonitor.java:37)
    09-16 22:33:10.642 6491-16242/com.abc.def E/ReceiveSMSMonitor:     at com.abc.def.ReceiveSMSMonitor$1.run(ReceiveSMSMonitor.java:61)
    09-16 22:33:10.642 6491-16242/com.abc.def E/ReceiveSMSMonitor:     at java.lang.Thread.run(Thread.java:818)
    09-16 22:36:49.729 6491-6501/com.abc.def W/art: Suspending all threads took: 33.323ms
    09-16 22:39:43.860 6491-6491/com.abc.def W/Resources: Converting to string: TypedValue{t=0x12/d=0xffffffff a=-1}
    09-16 22:39:43.861 6491-6491/com.abc.def W/Resources: Converting to string: TypedValue{t=0x12/d=0xffffffff a=-1}

1 个答案:

答案 0 :(得分:0)

我必须验证自己的手机号码。得到了这里的提示:

http://pchelp.ricmedia.com/how-to-fix-550-5-3-4-requested-action-not-taken-error/