Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding velocity template and also sending the mail using this  RSS feed

issak madeena Rahamatullah
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using velocity templates in struts , is there any configurations required in struts, please help me
ArrayList list = new ArrayList();
Map map = new HashMap();
map.put("FromAddress", from);
map.put("ToAddress", to);
map.put("ReportingManager", reportingmanageraddress);
map.put("Subject", subject);

VelocityContext context = new VelocityContext();
context.put("mail", list);
Template t = ve.getTemplate( "./src/email_html.vm" );
StringWriter writer = new StringWriter();

t.merge( context, writer );
System.out.println( writer.toString() );

then how to send mails by using this template
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!