Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Email not sent in Jasper Report Scheduling

I want to schedule my jasper report so that at a particular time, it will send the report to the mentioned id. I'm using Jasper Server 4.5.0 and I have scheduled a sample report to be sent to my gmail id. However, it's not been sent to the mail id and it doesn't show any Last Ran time too.

like image 413
Sahar Hassan Avatar asked Dec 13 '22 04:12

Sahar Hassan


1 Answers

I found it hard to setup GMail as my email server. So once I got it working I posted the details in this article.

In the spirit of keeping StackOverflow answers self-contained, here are the key settings. js.quartz.properties:

report.scheduler.web.deployment.uri=http://localhost/jasperserver
report.scheduler.mail.sender.host=smtp.gmail.com
[email protected]
report.scheduler.mail.sender.password=mypassword
[email protected]
report.scheduler.mail.sender.protocol=smtp
report.scheduler.mail.sender.port=587

applicationContext-report-scheduling.xml:

<property name="javaMailProperties">
    <props>
        <prop key="mail.smtp.auth">true</prop>  <!--as indicated in JasperReports-Server-Install-Guide.pdf)-->
        <prop key="mail.smtp.starttls.enable">true</prop>  <!--NOT indicated in JasperReports-Server-Install-Guide.pdf-->
    </props>
</property>
like image 167
mdahlman Avatar answered Dec 22 '22 00:12

mdahlman