我还写了一个调用javabean的,运行到transport.sendMessage就过不去,为了啥?

解决方案 »

  1.   

    : javax.mail.MessagingException: 505 Authentication required
      

  2.   

    protected PasswordAuthentication getPasswordAuthentication
    改成
    public PasswordAuthentication getPasswordAuthentication
      

  3.   

    感觉程序应该是完全对的呀。
    试试直接写:
    Transport.send(message);
    去掉:
    Transport transport = ss.getTransport("smtp");    //注意是smtp服务器
    transport.connect("101.205.18.13","[email protected]","1234567");
    transport.sendMessage(message,message.getAllRecipients());
      

  4.   

    to: java831(希望) 兄
    还是报错,Error 500: Sending failed; nested exception is: javax.mail.MessagingException: 505 Authentication required
      

  5.   

    javax.mail.MessagingException: 505 Authentication required这是什么错??
      

  6.   

       到网上搜索一下websphere的出错信息
      

  7.   

    有的邮件服务器需要验证auth为true,不需要验证的则为false那么
    props.put("mail.smtp.auth","true");改为
    props.put("mail.smtp.auth","false");
      

  8.   

    http://www.chinaunix.net/bbsjh/14/472.html
      

  9.   

    偶找到问题所在了,好像是websphere中要配置以下smtp的25端口,偶不是很清楚,偶是转到了tomcat才发出去的