Template t =TemplateLoader.load("UserCenter/mailTemplate.html");//邮件模板
Scope.RenderArgs templateBinding = Scope.RenderArgs.current();
templateBinding.put("url","http;//url"));
String result =t.render(templateBinding.data);
Mail.send("from@163.com", "to@163.com", "",result,"text/html")
超级简单。
交流Play!framework的群:120200883 请注明:play!framework