In this short article I want to share with you my experiense that I've got when I tried to configure TIBCO JasperReports® Server to sent it's e-mails with reports via https Gmail e-mail account.
To do this we should edit 2 configuration files:
in the jasperserver-proWEB-INFjs.quartz.properties file
report.scheduler.mail.sender.protocol should be set to smtps
report.scheduler.mail.sender.protocol=smtps
report.scheduler.mail.sender.port should be set to 465, or 587 if starttls is enabled:
report.scheduler.mail.sender.port=465
Below is shown the screenshot from my own configuration (please use your e-mail address and password of gmail account instead of information that is provided on the screenshot)
in the jasperserver-proWEB-INFapplicationContext-report-scheduling.xml file
Configure the auth property as shown, and starttls if required:
<prop key="mail.smtps.auth">true</prop>
<bean id="reportSchedulerMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host" value="${report.scheduler.mail.sender.host}"/> <property name="username" value="${report.scheduler.mail.sender.username}"/> <property name="password" value="${report.scheduler.mail.sender.password}"/> <property name="protocol" value="${report.scheduler.mail.sender.protocol}"/> <property name="port" value="${report.scheduler.mail.sender.port}"/> <property name="javaMailProperties"> <props> <prop key="mail.smtps.auth">true</prop> <!-- Uncomment below if required --> <!--prop key="mail.smtp.starttls.enable">true</prop--> </props> </property> </bean>
The application server needs be restarted to apply the changes that have been done.
You might also need to set Allow less secure apps: ON for your Gmail acccount:
C 2013-12-04 akonkin
U 2022-08-29 kkumlien
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now