Why Scheduled Report not getting mailed

Hi Every one,

        Greetings for the day!

i am using Jasper server Comminity Edition CP 6.1.0, I have created a Report and i am trying to schedue it,

as per the schedule report Report gets generated and saved into "/reports" folder,

but i am unable to get this report into Mail as i scheduled under notification.

following are the properties i am using for Jasper server mail settings.

"js.quartz.properties"

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

report.scheduler.mail.sender.host     = smtp.gmail.com
report.scheduler.mail.sender.username = <my Mail Id>
report.scheduler.mail.sender.password = <my Mail Id Password>
report.scheduler.mail.sender.from     = <my Mail Id>
report.scheduler.mail.sender.protocol = smtp
report.scheduler.mail.sender.port     = 587
 
 
i tried with the port no 25 and 465
 
 
and in "applicationContext-report-scheduling"
 
<property name="javaMailProperties">
  <props>
     <prop key="mail.smtp.sendpartial"> true </prop>
     <prop key="mail.smtp.auth"> true </prop>
     <prop key="mail.smtp.starttls.enable">true</prop>
  </props>
</property>
 
still i am unable to get mail, is there any other changes / Setting i need to do ?
 
 Please help, thanks in advance.
Ravi Kumar's picture
Joined: Aug 23 2014 - 8:08am
Last seen: 6 years 4 months ago

6 Answers:

Any Help ?

 

Ravi Kumar's picture
Joined: Aug 23 2014 - 8:08am
Last seen: 6 years 4 months ago

Hi,
on your localhost, go to View>>Messages;
This would give you the error. Share the error, it will tell us better about the scenario.

Thanks,
KKriplani

kkriplani's picture
5776
Joined: Sep 4 2015 - 2:18am
Last seen: 1 year 5 months ago
Subject:

The job failed to execute. Review its parameters.

Date:

Today

Component:

Report Scheduler

Message:

Job: TestReportJob1 (ID: 9737) Report unit: /reports/TestReport Quartz Job: ReportJobs.job_9737 Quartz Trigger: ReportJobs.trigger_9734_0 Exceptions: The job error notification was not completed. An error occurred while sending it. org.springframework.mail.MailAuthenticationException: Authentication failed; nested exception is javax.mail.AuthenticationFailedException at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:392) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJobMailNotificationImpl.sendMailNotification(ReportExecutionJobMailNotificationImpl.java:135) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:1063) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:557) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:236) at org.quartz.core.JobRunShell.run(JobRunShell.java:213) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) Caused by: javax.mail.AuthenticationFailedException at javax.mail.Service.connect(Service.java:306) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389) ... 8 more

 

Ravi Kumar's picture
Joined: Aug 23 2014 - 8:08am
Last seen: 6 years 4 months ago

Error says;
"The job error notification was not completed. An error occurred while sending it. org.springframework.mail.MailAuthenticationException: Authentication failed"

Check if the username, password and other credentials set in 
js.quartz.properties are entered correctly or not.

Hope this helps,
KKriplani

kkriplani's picture
5776
Joined: Sep 4 2015 - 2:18am
Last seen: 1 year 5 months ago

Hi KKriplani, thanks for your sugession!

issue with port number, i am using my company mail ID so i should use port number is 465, and also protocal should be smtps earlier i used smtp

Change:1

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

report.scheduler.mail.sender.host=smtp.gmail.com
report.scheduler.mail.sender.username= <My company Mail Address>
report.scheduler.mail.sender.password= <Password>
report.scheduler.mail.sender.from=<My company Mail Address>
report.scheduler.mail.sender.protocol=smtps
report.scheduler.mail.sender.port=465

Change:2 

 <property name="javaMailProperties">
            <props>
                <prop key="mail.smtps.sendpartial">true</prop>
                <prop key="mail.smtps.auth">true</prop>
               <prop key="mail.smtps.starttls.enable">true</prop>  
            </props>
        </property>
 
it works fine now , thanks for your help.

 

 

Ravi Kumar's picture
Joined: Aug 23 2014 - 8:08am
Last seen: 6 years 4 months ago

Glad i could help.
Regards,
KKriplani

kkriplani's picture
5776
Joined: Sep 4 2015 - 2:18am
Last seen: 1 year 5 months ago
Feedback
randomness