Examples of VelocityHtmlEmail


Examples of org.apache.turbine.util.velocity.VelocityHtmlEmail

//      ve.send();

//      Context emailContext = new org.apache.velocity.VelocityContext();
//      emailContext.put("emailbody", emailEntry.getBody());

      VelocityHtmlEmail ve = new VelocityHtmlEmail(data);
//      ve.setMailServer(TurbineResources.getString("mail.server"));
      ve.setCharset("UTF-8");
      ve.addTo( sEmailAddress, "");
      ve.setFrom(TurbineResources.getString("mail.smtp.from"), TurbineResources.getString("mail.smtp.from.name"));
      ve.setSubject(emailEntry.getSubject());
//      ve.setTextMsg(emailEntry.getBody());
      context.put("emailbody", emailEntry.getBody());
      ve.setTextTemplate("screens/SendEmail.vm");
      ve.send();

      return true;
     
    }else{
      data.setMessage("Sorry, the email address is unknown!");
View Full Code Here

Examples of org.apache.turbine.util.velocity.VelocityHtmlEmail

      Distributor dist = (Distributor) i.next();

      String sEmailAddress=dist.getEmail();

      if (sEmailAddress.length()>1){
      VelocityHtmlEmail ve = new VelocityHtmlEmail(data);
      ve.setCharset("UTF-8");
      ve.addTo( sEmailAddress, "");
      ve.setFrom(TurbineResources.getString("mail.smtp.from"), TurbineResources.getString("mail.smtp.from.name"));
      ve.setSubject(emailEntry.getSubject());
      context.put("name", dist.getDistributorName1());
      context.put("display", dist.getDistributorDisplay());
      context.put("dear", dist.getDear());
      context.put("email", dist.getEmail());
      context.put("custom1", dist.getCustom1());
      context.put("custom2", dist.getCustom2());
      context.put("custom3", dist.getCustom3());
      context.put("custom4", dist.getCustom4());
      context.put("custom5", dist.getCustom5());
      context.put("custom6", dist.getCustom6());
      context.put("emailbody", velTool.evaluate(emailEntry.getBody()));
      ve.setTextTemplate("screens/SendEmail.vm");
      ve.send();
      }
    }

    return true;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.