Email not sent to Jasper reporting schedule
I want to schedule a jasper report so that at a specific time it will send a report to the specified ID. I am using Jasper Server 4.5.0 and I have scheduled a sample report to be sent to my gmail id. However, it was not sent to the mail id and it also does not show the time of the last flight.
source to share
I found it difficult to install GMail as my mail server. So as soon as I got it working, I posted the details in this article .
In the spirit of keeping StackOverflow answers offline, here are the key settings. js.quartz.properties:
report.scheduler.web.deployment.uri=http://localhost/jasperserver
report.scheduler.mail.sender.host=smtp.gmail.com
report.scheduler.mail.sender.username=me@gmail.com
report.scheduler.mail.sender.password=mypassword
report.scheduler.mail.sender.from=me@gmail.com
report.scheduler.mail.sender.protocol=smtp
report.scheduler.mail.sender.port=587
ApplicationContext-reporting-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>
source to share
One observation,
If you are going to use email from Microsoft Exchange you need more lines in applicationContext-report-scheduling.xml
<props>
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.starttls.enable">true</prop>
<prop key="mail.smtp.starttls.required">true</prop>
</props>
source to share
in my case works with this
first edit this code
/opt/jasperreports-server-cp-5.1.0/apache-tomcat/webapps/jasperserver/WEB-INF/js.quartz.properties
report.scheduler.mail.sender.host=smtp.gmail.com
report.scheduler.mail.sender.username=username@gmail.com
report.scheduler.mail.sender.password=your_password
report.scheduler.mail.sender.from=username@gmail.com
report.scheduler.mail.sender.protocol=smtps
report.scheduler.mail.sender.port=465
second edit this
non-automatic / JasperReports-server-f-5.1.0 / apache-cat / WebApps / JasperServer / WEB-INF / ApplicationContext-report-scheduling.xml
<bean id="reportSchedulerMailSender">
<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>
<prop key="mail.smtps.starttls.enable">true</prop>**
</props>
</property>
</bean>
source to share