mimeMessage.setFrom(new InternetAddress("[email protected]"));
当我设置发件人地址与真实的发件人地址不一样时邮件无法发送成功! 
class javax.mail.MessagingException: 553 You are not authorized to send mail, authentication is required

解决方案 »

  1.   

    553 You are not authorized to send mail, authentication is required告诉你原因了
      

  2.   


    用common-mail组件吧 对java-mail进行了封装 里面的setFrom()可以直接写任何的string
      

  3.   

    我的Authenticator类中邮箱的用户名和密码是正确无误的,而且邮箱的SMTP/POP3协议也是开启的
    难道mimeMessage.setFrom的email地址和Authenticator类中验证的用户名一定要一样?
    到底怎样才能 让收件人看到的发件人地址并非真实的发件人地址???