Skip to content
Calvin edited this page Nov 13, 2013 · 2 revisions

Spring Mail对JavaEE的Mail API做了很好的封装,在showcase项目演示了普通Email,带附件的Email,用Freemarker模板批量生成Html格式的群发邮件等等。

在开发测试环境中,使用GreenMail模拟Smtp Server,在springside extension中封装了一个与Spring集成的MailServerSimulator,在localhost的3025端口启动一个Smtp Server,并将GreenMail对象放入到Spring的ApplicationContext中。 具体使用 见showcase中的applicationContext-email.xml 和 MailServiceTest.java.