setup SMTP in Jaspersoft for scheduled reports

Document ID : KB000093228
Last Modified Date : 27/04/2018
Show Technical Document Details
Introduction:
We are trying to set up js.quartz.properties to define SMTP server in order to email scheduled reports. Our SMTP server does not require credentials - if I comment out the section for credentials, Jasper Tomcat does not start (errors out) How can I set up SMTP server in this file w/o using credentials?
Background:
The SMTP server needs to be configure for Jaspersoft to email scheduled reports. 

h

 
Instructions:
To set the SMTP host information for Jaspersoft, update the 'report.scheduler.web.deployment.uri' attribute value in the 'js.quartz.properties' file, which is located at <jasperserver-pro>/WEB-INF/js.quartz.properties.

report.scheduler.web.deployment.uri=http://localhost:8080/jasperserver-pro

report.scheduler.mail.sender.host=mail.example.com
report.scheduler.mail.sender.username=admin
report.scheduler.mail.sender.password=password
report.scheduler.mail.sender.from=admin@example.com
report.scheduler.mail.sender.protocol=smtp
report.scheduler.mail.sender.port=25

- Be sure to edit the report.scheduler.web.deployment.uri and change "localhost:8080" to be the actual Jaspersoft hostname
- If the SMTP server does not require login credentials, these lines can be left blank. E.G.:
report.scheduler.mail.sender.username=
report.scheduler.mail.sender.password=

In addition, if the SMTP server connection is over a secure connection "SMTPS" then you may also need to enable SMTPS in jasperserver-pro\WEB-INF\applicationContext-report-scheduling.xml file:

<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>
            </props>
        </property>
</bean>
- Restart Jasersoft Tomcat for changes to take effect. 
Additional Information:
Spectrum docops: ttps://docops.ca.com/ca-spectrum/10-2-3/en/installing-and-upgrading/install-report-manager/cabi-jasperreports-server/how-to-run-reports-using-the-jasperreports-server

Jaspersoft guides: https://community.jaspersoft.com/wiki/configuring-report-scheduler#Setting_Up_the_Connection_to_your_Outbound_Email_Server