kenu
56k
2016-08-10 10:57:34
0
3212

[err] javax.mail.AuthenticationFailedException: 534-5.7.14


Yona 에서 gmail의 SMTP로 메일을 보내기 위해서 필요한 과정입니다.

아래와 같은 예외를 만나면...

[error] play - Cannot invoke the action, eventually got an error: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465
[error] application -

! @7133klgee - Internal server error, for (POST) [/sites/mail] ->

play.api.Application$$anon$1: Execution exception[[EmailException: Sending the email to the following server failed : smtp.gmail.com:465]]
	at play.api.Application$class.handleError(Application.scala:296) ~[com.typesafe.play.play_2.10-2.3.6.jar:2.3.6]
	at play.api.DefaultApplication.handleError(Application.scala:402) [com.typesafe.play.play_2.10-2.3.6.jar:2.3.6]
	at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [com.typesafe.play.play_2.10-2.3.6.jar:2.3.6]
	at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [com.typesafe.play.play_2.10-2.3.6.jar:2.3.6]
	at scala.Option.map(Option.scala:145) [org.scala-lang.scala-library-2.10.4.jar:na]
Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465
	at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1401) ~[org.apache.commons.commons-email-1.3.1.jar:1.3.1]
	at org.apache.commons.mail.Email.send(Email.java:1428) ~[org.apache.commons.commons-email-1.3.1.jar:1.3.1]
	at info.schleichardt.play2.mailplugin.MailPlugin$$anonfun$6.apply(MailPlugin.scala:60) ~[info.schleichardt.play-2-mailplugin_2.10-0.9.1.jar:0.9.1]
	at info.schleichardt.play2.mailplugin.MailPlugin$$anonfun$6.apply(MailPlugin.scala:54) ~[info.schleichardt.play-2-mailplugin_2.10-0.9.1.jar:0.9.1]
	at info.schleichardt.play2.mailplugin.MailPlugin.send(MailPlugin.scala:68) ~[info.schleichardt.play-2-mailplugin_2.10-0.9.1.jar:0.9.1]
Caused by: javax.mail.AuthenticationFailedException: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbum
534-5.7.14 zMTXrkRnef3R1BJ1AXHJLW6AdqWzZXl9eOKyd-mF5vz5LluOjUCTZFbfCmX2WyrpFOE6Si
534-5.7.14 7wVejKcPxBYvLMW-A8HYONwr7S4lsHMa6-8gEjdEgzUobDfYWPRj95Q9JDxSE7mwUrbzma
534-5.7.14 cssgEIQSeqUt13u1FRKUycI0YAvLXf2ge3_lM5DbVUFkMDlZ2jIkGlVRybHEpZZ8CnP43M
534-5.7.14 gDH-cSIvKeY3lWmi2db9Ni-xYmmvM> Please log in via your web browser and
534-5.7.14 then try again.
534-5.7.14  Learn more at
534 5.7.14  https://support.google.com/mail/answer/78754 tm1sm58997920pac.23 - gsmtp

	at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:823) ~[javax.mail.mail-1.4.5.jar:1.4.5]
	at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:756) ~[javax.mail.mail-1.4.5.jar:1.4.5]
	at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:673) ~[javax.mail.mail-1.4.5.jar:1.4.5]
	at javax.mail.Service.connect(Service.java:317) ~[javax.mail.mail-1.4.5.jar:1.4.5]
	at javax.mail.Service.connect(Service.java:176) ~[javax.mail.mail-1.4.5.jar:1.4.5]


https://www.google.com/settings/security/lesssecureapps

페이지로 smtp 메일을 보낼 계정으로 로그인 하고, "사용" 으로 변경해야 gmail의 smtp를 이용할 수 있습니다.




http://stackoverflow.com/questions/25341198/javax-mail-authenticationfailedexception-is-thrown-while-sending-email-in-java


0
  • 댓글 0

  • 로그인을 하시면 댓글을 등록할 수 있습니다.