spring javamail 使用
?
2 ?spring 发送email信息的类
??
?
3 测试启动
??
public static void main(String[] args) {ClassPathResource res = new ClassPathResource("spring/applicationContext-mail.xml");XmlBeanFactory factory = new XmlBeanFactory(res);TestSenderMail testSenderMail = (TestSenderMail) factory.getBean("testMailSender");testSenderMail.sendMail();}?
?