Announcement Announcement Module
Collapse
No announcement yet.
$status.value not working html mail Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • $status.value not working html mail

    Hello all,

    I am using spring to send html email.Following is the code of my prepare method.

    public void prepare(MimeMessage mime) throws Exception {
    mime.addFrom(InternetAddress.parse(msg.getFromEmai l()));
    mime.addRecipients(Message.RecipientType.TO, InternetAddress.parse(msg.getDeveloperEmail()));
    mime.setSubject("Survey Form");

    MimeMultipart ma = new MimeMultipart("alternative");
    mime.setContent(ma);

    BodyPart html = new MimeBodyPart();
    String st = VelocityEngineUtils.mergeTemplateIntoString(getVel ocityEngine(), htmlTemplate,data);
    html.setContent(st,"text/html");
    ma.addBodyPart(html);

    }

    <bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEng ineFactoryBean">
    <property name="resourceLoaderPath"><value>/WEB-INF/velocity</value></property>
    <property name="configLocation"><value>/WEB-INF/velocity.properties</value></property>

    </bean>



    But,when i get the eamil $status.value doesn't replace bean property values.Do i have to set the velocityView relosver on the velocity engine object. i have no idea at this point.

    please respond.
Working...
X