How to configure Jasper Reports scheduler service with GMAIL?

Document ID : KB000072192
Last Modified Date : 05/06/2018
Show Technical Document Details
Question:
How to configure Jasper Reports scheduler service with GMAIL so it can be used with the Service Management reports?
Environment:
Service Desk 14.1.0.3 or above JasperSoft Reports 6.2.0 or above
Answer:

It is possible to configure Jasper Reports with GMAIL, to do this it is necessary to edit 2 configuration files in the jasperserver-pro\WEB-INF\ directory:

 

js.quartz.properties

applicationContext-report-scheduling.xml

 

1. Edit the js.quartz.properties search for the following lines:

report.scheduler.mail.sender.host=smtp.gmail.com
report.scheduler.mail.sender.username=YOURMAILACCOUNT@gmail.com
report.scheduler.mail.sender.password=YOURPASSWORD
report.scheduler.mail.sender.from=YOURMAILACCOUNT@gmail.com
report.scheduler.mail.sender.protocol=smtps
report.scheduler.mail.sender.port=465

Modify the highlighted lines and save the file.

2. Edit the applicationContext-report-scheduling.xml looking for the following lines:

Change it from:

<property name="javaMailProperties">
            <props>
                <prop key="mail.smtp.auth">true</prop>
                ...
            </props>
        </property>

Change it to:

<property name="javaMailProperties">
            <props>
                <prop key="mail.smtps.auth">true</prop>
                <prop key="mail.smtps.starttls.enable">true</prop>

...
            </props>
        </property>

3. Restart the Jasper Report service

Note: The three dots are an indicator that there might be additional properties which do not need to be removed or modified, only the highlighted lines should be added or modified.

Additional Information: