Version 9.1 & Later
This section describes how to setup the scheduler available in JasperReports Server in version 9.1 and later. For version 9.0 and older, see the Version 9.0 section below. These settings will allow you to email multiple recipients when a scheduled report is complete.
To set up the JasperReports Scheduler:
- Stop the Jasper server.
- Go to the
%JASPER_HOME%/apache-tomcat/webapps/jasperserver-pro/WEB-INF
directory. - Open the
js.quartz
properties file using a text editor and specify the following properties:<report.scheduler.mail.sender.host=<value>
report.scheduler.mail.sender.username=<value>
report.scheduler.mail.sender.password=<value>
report.scheduler.mail.sender.from=<value>
report.scheduler.mail.sender.protocol=smtp
report.scheduler.mail.sender.port=587
report.scheduler.mail.smtp.starttls.enable=true
report.scheduler.mail.smtp.auth=true
- Add the following properties in the
applicationcontext.xml
file:property name="javaMailProperties">
<props>
<prop key="mail.smtp.sendpartial">true</prop>
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.starttls.enable">true</prop>
</props>
- Add the following properties to the
applicationcontetx-report-scheduling.xml
file:
property name="javaMailProperties">
<props>
<prop key="mail.smtp.sendpartial">true</prop>
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.starttls.enable">true</prop>
</props>
- Restart the server.
- Add Schedule information(follow steps above) for any report and verify email.
Version 9.0
1. Stop the JasperReports Server service.
2. Go to the %JASPER_HOME%/apache-tomcat/webapps/jasperserver-pro/WEB-INF
directory, open the js.quartz
properties file by using a text editor, and specify the following properties:
report.scheduler.mail.sender.host=<value>
report.scheduler.mail.sender.username=<value>
report.scheduler.mail.sender.password=<value>
report.scheduler.mail.sender.from=<value>
Where host is the computer name containing the mail server, username is the name of the user in the mail server that JasperReports Server will use, password is mail user's password, and from is the email address that appears in the From field of email notifications.
3. When you finish configuring the properties, restart the JasperReports Server service to show the latest changes.