起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2428|回复: 4

[处理中1] WeX5注册问题

[复制链接]

156

主题

615

帖子

2583

积分

金牌会员

Rank: 6Rank: 6

积分
2583
QQ
发表于 2016-4-22 12:49:28 | 显示全部楼层 |阅读模式
WeX5.3.4版本中的邮箱注册demo中,使用邮箱注册报下面的错误:DEBUG: setDebug: JavaMail version 1.4.2
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.qq.com", port 25, isSSL false
220 smtp.qq.com Esmtp QQ Mail Server
DEBUG SMTP: connected to host "smtp.qq.com", port: 25

EHLO liangcy
250-smtp.qq.com
250-PIPELINING
250-SIZE 73400320
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN
250-MAILCOMPRESS
250 8BITMIME
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "SIZE", arg "73400320"
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN"
DEBUG SMTP: Found extension "AUTH=LOGIN", arg ""
DEBUG SMTP: Found extension "MAILCOMPRESS", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5
AUTH LOGIN
334 VXNlcm5hbWU6
c210cC5xcS5jb20=
530 Error: A secure connection is requiered(such as ssl). More information at http://service.mail.qq.com/cgi-bin/help?id=28
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.qq.com", port 25, isSSL false
220 smtp.qq.com Esmtp QQ Mail Server
DEBUG SMTP: connected to host "smtp.qq.com", port: 25

EHLO liangcy
250-smtp.qq.com
250-PIPELINING
250-SIZE 73400320
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN
250-MAILCOMPRESS
250 8BITMIME
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "SIZE", arg "73400320"
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN"
DEBUG SMTP: Found extension "AUTH=LOGIN", arg ""
DEBUG SMTP: Found extension "MAILCOMPRESS", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5
AUTH LOGIN
334 VXNlcm5hbWU6
MjU2OTAwMDk0Mw==
334 UGFzc3dvcmQ6
Y2hIb3JzZTEyMw==
535 Error: 请使用授权码登录。详情请看: http://service.mail.qq.com/cgi-b ... amp;&no=1001256
com.justep.baas.action.ActionException: Action[justep/Register/sendEmail]执行失败,failed to connect
        at com.justep.baas.action.Engine.execAction(Unknown Source)
        at com.justep.baas.action.Engine.execAction(Unknown Source)
        at com.justep.baas.servlet.BaasServlet.execService(Unknown Source)
        at com.justep.baas.servlet.BaasServlet.service(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        ... 16 more
Caused by: javax.mail.AuthenticationFailedException: failed to connect
        at javax.mail.Service.connect(Service.java:322)
        at javax.mail.Service.connect(Service.java:172)
        at javax.mail.Service.connect(Service.java:192)
        at justep.Register.sendEmail(Register.java:78)
        at justep.Register__do.sendEmail(Register__do.java:43)
        ... 20 more
四月 22, 2016 12:45:13 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet WeX5_Baas_Servlet threw exception
javax.mail.AuthenticationFailedException: failed to connect
        at javax.mail.Service.connect(Service.java:322)
        at javax.mail.Service.connect(Service.java:172)
        at javax.mail.Service.connect(Service.java:192)
        at justep.Register.sendEmail(Register.java:78)
        at justep.Register__do.sendEmail(Register__do.java:43)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.justep.baas.action.Engine.execAction(Unknown Source)
        at com.justep.baas.action.Engine.execAction(Unknown Source)
        at com.justep.baas.servlet.BaasServlet.execService(Unknown Source)
        at com.justep.baas.servlet.BaasServlet.service(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:745)


1、这个怎么解决?我记得刚开始的时候好像没有问题的,不知道为什么现在就不行了。
2、我想换成使用自己的邮箱发送验证,请需要做什么设置吗?


91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36067
发表于 2016-4-22 14:25:32 | 显示全部楼层
javax.mail.AuthenticationFailedException: failed to connect
        at javax.mail.Service.connect(Service.java:322)
        at javax.mail.Service.connect(Service.java:172)
        at javax.mail.Service.connect(Service.java:192)
        at justep.Register.sendEmail(Register.java:78)
        at justep.Register__do.sendEmail(Register__do.java:43)

1.确认下面的都配置的正确吗?
//设置发送用户名,SMTP
        String SEND_UNAME = "2569000943";
        String VALUE_SMTP = "smtp.qq.com";
        //设置SMTP端口号,发送人的邮箱和密码
        Properties props = System.getProperties();
        props.setProperty("mail.smtp.host", "smtp.qq.com");
        props.setProperty("mail.smtp.port", "25");
        props.put("mail.smtp.auth", "true");
        final String username = "2569000943";
        final String password = "chHorse123";

2.自己的邮箱发送验证就自己修改/Baas/justep/Register.java中sendEmail下的实现,这个就是java标准的
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

156

主题

615

帖子

2583

积分

金牌会员

Rank: 6Rank: 6

积分
2583
QQ
 楼主| 发表于 2016-4-22 16:43:25 | 显示全部楼层
1、我检查了,配置是正确的,但是,真的不行了,是不是你们的测试邮箱密码修改了?要不,你帮我在你本地测试一下?

另外代码中有一个地方很是疑惑,如下:

        // smtp验证,就是你用来发邮件的邮箱用户名密码
        transport.connect(VALUE_SMTP, SEND_UNAME);

这个写的用户名和密码,但是,这两个变量VALUE_SMTP和SEND_UNAME不是用户名和密码,这是注释写错了吗?

2、我尝试做了修改,但是没有成功。是不是邮箱还需要做什么设置?有这方面的说明吗,麻烦了
回复 支持 反对

使用道具 举报

156

主题

615

帖子

2583

积分

金牌会员

Rank: 6Rank: 6

积分
2583
QQ
 楼主| 发表于 2016-5-4 15:59:33 | 显示全部楼层
好像被遗忘了
回复 支持 反对

使用道具 举报

1

主题

32

帖子

247

积分

中级会员

Rank: 3Rank: 3

积分
247
QQ
发表于 2016-5-28 22:08:54 | 显示全部楼层
楼主的问题解决了么?能否说一下情况?谢谢!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-11-22 19:31 , Processed in 0.054773 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表