Sources:

Steps:

  • set correct smtp and login information in the file “…/jasperreports-server-cp-x.x.x/apache-tomcat/webapps/jasperserver/WEB-INF/js.quartz.properties”:
    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
  • if you want to use gmail you will have to use port 587 instead of 25
  • you also have to set other smtp / smtps properties in the file “…/jasperreports-server-cp-6.4.2/apache-tomcat/webapps/jasperserver/WEB-INF/applicationContext-report-scheduling.xml”:
            <property name="javaMailProperties">
                <props>
                    <prop key="mail.smtps.sendpartial">true</prop>
                    <prop key="mail.smtp.sendpartial">true</prop>
                    <prop key="mail.smtps.auth">true</prop>
                    <prop key="mail.smtp.auth">true</prop>
                    <prop key="mail.smtps.starttls.enable">true</prop>
                    <prop key="mail.smtp.starttls.enable">true</prop>
                </props>
            </property>