是我在该smtp服务器上的邮箱密码吗?应该怎么设置?sendMailSession = Session.getInstance(props, null);
改为:
sendMailSession =Session.getDefaultInstance(props, new Authenticator(){
public PasswordAuthentication getPasswordAuthentication(){
return new PasswordAuthentication(username(用户名),userpass(密码));}});我用了这种方法以后也还是不行,还是connect不了smtp服务器。
改为:
sendMailSession =Session.getDefaultInstance(props, new Authenticator(){
public PasswordAuthentication getPasswordAuthentication(){
return new PasswordAuthentication(username(用户名),userpass(密码));}});我用了这种方法以后也还是不行,还是connect不了smtp服务器。
解决方案 »
- jsp 进度条
- http://reg.163.com/Main.jsp?username=aihuichuanshuo
- 面试了很多公司,都是有面试,没有消息.
- MAX语名没问题怎么会报错,,高手...来啊.....................................
- 请教jsp mysql 的数据连结问题
- strut2 拦截器和校验框架有什么关系。。。。。。
- 从servlet传参数到jsp用什么方法?
- 做个调查!散分啦!
- 一个难题!在线等!
- 我也来问tomcat的配置问题
- Struts的错误
- 链接数据库出错:cannot create poolableconnectionfactory
如果没有就到www.apache.org上去下载james!