CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Java >  J2SE / 基础类

100分,快拿。

楼主csdn_k()2002-03-07 11:52:54 在 Java / J2SE / 基础类 提问

Sending   failed;  
      nested   exception   is:    
  javax.mail.MessagingException:   553   Authentication   is   required   to   send   mail   as   <bj2561@163.com>  
   
  该错误如何解决? 问题点数:100、回复次数:8Top

1 楼Hikaru(光)回复于 2002-03-07 12:04:44 得分 10

可能是SMTP   服务认证不通过Top

2 楼zjq1980(阿易)回复于 2002-03-07 12:22:30 得分 10

This   error   is   caused   for   one   of   two   reasons:    
  You   are   attempting   to   send   email   to   a   domain   that   is   not   recognized   by   this   server  
   
   
  You   are   attempting   to   relay   email   through   this   server,   and   have   not   authenticated    
  Most   likely   you   are   seeing   this   message   because   you   have   not   authenticated.   To   use   this   server   as   a   relay   (to   send   email   to   an   outside   address   using   your   domain   name),   you   must   authenticate   first.    
   
  You   can   do   this   in   one   of   two   ways:    
  SMTP   Authentication   -   SMTP   AUTH   is   a   method   for   verifying   a   user's   login   and   password   before   allowing   Mail   to   be   sent   to   other   Mail   Servers   on   the   Internet.   Your   Email   Client   is   required   to   login   before   sending   mail.   This   method   allows   you   to   simply   enter   your   Username   and   Password   (the   same   ones   you   use   for   POP   or   IMAP)   in   the   SMTP   settings   in   your   email   program.    
   
   
  POP   before   Send   -   This   method   allows   you   to   simply   check   your   email   before   sending.   Once   you   have   checked   your   email,   you   are   allowed   to   relay   for   the   next   15   minutes   from   your   current   IP   address   without   further   authentication.Top

3 楼haichuang(不戒和尚)回复于 2002-03-07 12:27:17 得分 10

smtp认证不通过。  
  这是因为你使用的smtp服务器加了认证,你必须拥有该服务器上合法的用户名和密码才能使用该服务器的smtp服务。Top

4 楼yanchang(笨笨)回复于 2002-03-07 12:49:11 得分 30

是的,他的邮件smtp要发信人证的  
  你要修改以下你的方法  
  props.put("mail.smtp.host",   "smtp.sina.com.cn");    
  props.put("mail.smtp.auth",   "true");  
   
  。。。。。。。  
  transport.connect("smtp.sina.com.cn",   "name","password")Top

5 楼csdn_k()回复于 2002-03-07 13:23:42 得分 0

我用了你的办法,但是有报下面的错误:  
  Sending   failed;  
      nested   exception   is:    
  javax.mail.AuthenticationFailedExceptionTop

6 楼skyyoung(路人甲)回复于 2002-03-07 14:35:02 得分 0

http://java.sun.com/products/javamail/1.2/docs/javadocs/javax/mail/Authenticator.htmlTop

7 楼skyyoung(路人甲)回复于 2002-03-07 14:45:18 得分 40

Keep   in   mind   that   the   Authenticator   in   JavaMail   is   different   than   the   one   in   the   java.net   package.   To   use   the   javax.mail.Authenticator,   the   basic   process   to   connect   to   the   Store   is   as   follows:    
   
  //   Create   empty   properties  
  Properties   props   =   new   Properties();  
  props.put("mail.host",   host);  
   
  //   Setup   authentication,   get   session  
  Authenticator   auth   =   new   PopupAuthenticator();  
  Session   session   =   Session.getInstance(  
          props,   auth);  
   
  //   Get   the   store  
  Store   store   =   session.getStore("pop3");  
  store.connect();  
   
  Then,   you   would   need   to   create   a   PopupAuthenticator   class   that   extends   Authenticator.   In   the   public   PasswordAuthentication   getPasswordAuthentication()   method,   the   class   would   pop   a   frame   up   prompting   for   username   and   password,   returning   the   information   in   a   PasswordAuthentication   object.    
   
  Top

8 楼csdn_k()回复于 2002-03-07 15:25:41 得分 0

谢谢,结帐!Top

相关问题

  • 快来拿分!!!
  • 快來拿分﹗
  • 快来拿分!!!
  • 快快来拿分啊~~~~
  • cken快来拿分
  • volcy,快来拿分!
  • edyang,快来拿分!!!
  • 30分 快来拿
  • sweihua,快来拿分!!!!
  • enmity,快来拿分!!!

关键词

  • 服务器
  • smtp
  • authenticator
  • mail
  • props
  • auth
  • relay
  • email
  • sending
  • before

得分解答快速导航

  • 帖主:csdn_k
  • Hikaru
  • zjq1980
  • haichuang
  • yanchang
  • skyyoung

相关链接

  • CSDN Java频道
  • Java类图书
  • Java类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo