java 用QQ邮箱发邮件问题

代码如下:

private static final String account = "xxx@qq.com";
    private static final String password = "xxx";
    private static final String host = "smtp.qq.com";
    //  private static final String account = "xxx@163.com";
//  private static final String password = "xxx";
//  private static final String host = "smtp.163.com";
 public static void main(String[] args) {
        String content = "dfaferdfgfd";
        Session session = getSession();  
            MimeMessage message = new MimeMessage(session);  
            try {  
                message.setSubject("找回您的帐户与密码");  
                message.setSentDate(new Date());  
                message.setFrom(new InternetAddress(account));  
                message.setRecipient(RecipientType.TO, new InternetAddress(to));  
                message.setContent(content,"text/html;charset=utf-8");  
                // 发送邮件  
                System.out.println("sendResetPasswordEmail:邮件发送-->");
                Transport.send(message);  
            } catch (Exception e) {  
                e.printStackTrace();  
            }  
    }
    public static Session getSession() {  
        Security.getProviders();       
        Properties props = new Properties();  
        props.setProperty("mail.transport.protocol", "smtp");  
        props.setProperty("mail.smtp.host", host);  
        props.setProperty("mail.smtp.port", "25");  
        props.setProperty("mail.smtp.auth", "true"); 
//          props.setProperty("mail.smtp.ssl.enable", "false"); 
//          props.setProperty("mail.smtp.socketFactory.class","javax.net.ssl.SSLSocketFactory"); 
//          props.setProperty("mail.smtp.port","465");
//          props.setProperty("mail.smtp.socketFactory.port","465");
        Session session = Session.getInstance(props, new Authenticator() {  
            @Override  
            protected PasswordAuthentication getPasswordAuthentication() {  
                return new PasswordAuthentication(account, password);  
            }  

        });  
        session.setDebug(true);
        return session;  
    } 

使用163邮箱发送邮件正常,用QQ邮箱发送就报错了。报错如图,邮箱帐号密码是正确的
图片说明

http://blog.csdn.net/yangdong3129/article/details/20998741

http://blog.csdn.net/ontheway20/article/details/17964593

http://blog.csdn.net/sun2015_07_24/article/details/50467133简单好用