電子メールは、SpringおよびJavaメール送信者を使用して送信されています。
とにかく、通常のjspビューとjstlタグを使用できますか?タグ/構文の別の束を学びたくないですか?
現在、私のコードは次のようになっています。
StringBuffer content = new StringBuffer();
Configuration configuration = freeMarkerConfigurer.getConfiguration();
String templateName = "vslEmail.ftl";
Map<String, String> templateVars = new HashMap<String, String>();
templateVars.put("firstName", "john");
templateVars.put("surname", "doe");
try {
content.append(FreeMarkerTemplateUtils.processTemplateIntoString(configuration.getTemplate(ftlName), tempalteVars));
}
catch (Exception e) {
// handle
}
// content.append("<br>Test data");
sendMime(defaultEmailAddress, subject, content.toString());
私はftlの代わりにjspを参照したいだけですか?