I am using Velocity enguine and java mailing service to send mails. i am using SMTP protocal.. here are my configurations for that
bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"/
property name="host" value="lotus.acme.com"/
property name="port" value="25"/
property name="username" value="edosrvc"/
property name="password" value="wipro@123"/
property name="javaMailProperties"
props
<!-- Use SMTP transport protocol -->
prop key="mail.transport.protocol">smtp</prop>
<!-- Use SMTP-AUTH to authenticate to SMTP server -->
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.ssl.trust">*</prop>
<!-- Use TLS to encrypt communication with SMTP server -->
<prop key="mail.smtp.starttls.enable">true</prop>
<prop key="mail.debug">true</prop>
</props>
</property>
</bean>
<bean id="esi" class="com.example.NotificationServiceImpl">
<property name="mailSender" ref="mailSender" />
<property name="velocityEngine" ref="velocityEngine" />
</bean>
<bean id="velocityEngine"class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<value>
resource.loader=class
class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</value>
</property>
</bean>
<bean id="templateMessage" class="org.springframework.mail.SimpleMailMessage">
<property name="from" value="samplesrvc@acme.com"></property>
</bean>
i have tried including this property also
*
even then i am getting the belo error
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:174) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:280) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:191) at sun.security.validator.Validator.validate(Validator.java:218)
can anyone please help me on this issue.
I am very new to these protocals and server certificates.
so any one can please tell me how to get my work done soon.
Thanks in advance.