public class Send { public Send(){} //需要的jar包4个:commons-email-1.2.jar commons-email-1.2-javadoc.jar //commons-email-1.2-sources.jar mail.jar public static void main(String[] args) { send(); } //QQ邮箱对应的pop3和smtp服务器地址为:pop3:pop.qq.com; //smtp:smtp.qq.com,请参考
public static void send() { SimpleEmail email = new SimpleEmail(); email.setTLS(true); email.setHostName("smtp.qq.com"); email.setAuthentication("449111111@qq.com", "qq密码");