去看看这个帖子。
http://expert.csdn.net/Expert/TopicView1.asp?id=1788894可以成功发信。

解决方案 »

  1.   

    现在的邮箱发信一般都要认证,从错误信息看不像是认证的错误,但你还是加上的好,
    另:你的text是怎么定义的?
      Properties props = new Properties();
      props.put("mail.smtp.host", accountValue.sendServer);
      props.put("mail.smtp.auth","true");
      Authenticator authenticator = new EmailAuthenticator(
                     accountValue.username,accountValue.password);
      mailSession = Session.getInstance(props, authenticator);
      store = mailSession.getStore(accountValue.receiveServerType);
      store.connect(accountValue.receiveServer, accountValue.username,
                             accountValue.password);
    //用户认证类
    package cn.mail;import javax.mail.PasswordAuthentication;public class EmailAuthenticator extends javax.mail.Authenticator {
      public EmailAuthenticator(String username,String password) {
        setUsername(username);
        setPassword(password);
      }
      private String username;
      private String password;
      public void setUsername(String username)
      {
        this.username = username;
      }
      public void setPassword(String password)
      {
        this.password = password;
      }
      public PasswordAuthentication getPasswordAuthentication()
      {
        return new PasswordAuthentication(username,password);
      }
    }