我也遇到了一个问题,总是报553的错,好像是权限问题,邮件不能发,用的是smtp.163.com

解决方案 »

  1.   

    没有人写过类似的JavaMail程序吗?应该很通用才对呀!
      

  2.   

    这个错误就像是c#里的“是否缺少using语句引用”,你是不是没有注册那个类?
      

  3.   

    你需要写这样一个认证类 Email_Autherticator,继承Autherticator !!!!!
      

  4.   

    // Decompiled by DJ v2.9.9.60 Copyright 2000 Atanas Neshkov  Date: 2004-12-25 11:32:52
    // Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
    // Decompiler options: packimports(3) 
    // Source File Name:   MailAuthenticator.javapackage com.zeal.mail;import javax.mail.Authenticator;
    import javax.mail.PasswordAuthentication;public class MailAuthenticator extends Authenticator
    {    public MailAuthenticator()
        {
            user = "";
            password = "";
        }    public MailAuthenticator(String user, String password)
        {
            this.user = user;
            this.password = password;
        }    public MailAuthenticator(String user)
        {
            this.user = user;
            password = "";
        }    public PasswordAuthentication getPasswordAuthentication()
        {
            return new PasswordAuthentication(user, password);
        }    private String user;
        private String password;
    }
      

  5.   

    用java开发email功能,需要引入哪些包啊???????
      

  6.   

    //用java开发email功能,需要引入哪些包啊???????javamail 的mail.jar和jaf的activation.jar