Email notification not working

0

Hello,

I am getting the following error when I am scheduling a report :

Subject:

The job failed to execute. Review its parameters.

Date:

Today

Component:

Report Scheduler

Message:

Job: nak (ID: 2317) Report unit: /public/Samples/Reports/01._Geographic_Results_by_Segment_Report Quartz Job: ReportJobs.job_2317 Quartz Trigger: ReportJobs.trigger_2313_0 Error Message: The job error notification was not completed. An error occurred while sending it. Exceptions: 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:139) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:1059) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:570) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:241) at com.jaspersoft.ji.report.options.engine.ReportOptionsExecutionJob.execute(ReportOptionsExecutionJob.java:47) 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) ... 9 more Error Message: fail to send out alert mail notification Exceptions: 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.ReportExecutionJobAlertImpl.sendAlertMail(ReportExecutionJobAlertImpl.java:97) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendAlertMail(ReportExecutionJob.java:708) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:595) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:241) at com.jaspersoft.ji.report.options.engine.ReportOptionsExecutionJob.execute(ReportOptionsExecutionJob.java:47) 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) ... 9 more

 

I have made following configuration in applicationContext-report-scheduling

 <property name="javaMailProperties">
            <props>
          <!--<prop key="mail.smtp.sendpartial">true</prop>-->
                <prop key="mail.smtps.auth">true</prop>
                <prop key="mail.smtps.starttls.enable">true</prop>
            </props>
</property>
 
 
I have made the following configuration in js.quartz.properties
 
report.scheduler.mail.sender.host=smtp.gmail.com
report.scheduler.mail.sender.username=myname@gmail.com
report.scheduler.mail.sender.password=xxxxxxxxx
report.scheduler.mail.sender.from=myname@gmail.com
report.scheduler.mail.sender.protocol=smtps
report.scheduler.mail.sender.port=465
 
What is the problem I could not able to figure it out.

Thanks
shivkumar.mallesappa's picture
Joined: Mar 18 2015 - 11:59pm
Last seen: 3 years 7 months ago

5 Answers:

0

From the error,
"The job error notification was not completed. An error occurred while sending it. Exceptions: org.springframework.mail.MailAuthenticationException: Authentication failed":
It clearly seems to be an authentication error. Check the quartz file. Even if the username/password are right, users tend to make an error with the mail port.

 

I had encountered a similar query on this forum a few days back; have a look, 
http://community.jaspersoft.com/questions/972516/why-scheduled-report-no...
 

 

Hope this helps,

KKriplani
 

kkriplani's picture
858
Joined: Sep 4 2015 - 2:18am
Last seen: 2 weeks 6 days ago
0

This is my new configuration :

 

report.scheduler.mail.sender.host=smtp.gmail.com
report.scheduler.mail.sender.username=myname@gmail.com
report.scheduler.mail.sender.password=xxxxxxxxx
report.scheduler.mail.sender.from=myname@gmail.com
report.scheduler.mail.sender.protocol=smtps
report.scheduler.mail.sender.port=465
 
 
and for application context :
 
<prop key="mail.smtps.sendpartial">true</prop>
<prop key="mail.smtps.auth">true</prop>
 <prop key="mail.smtps.starttls.enable">true</prop>
 

Still facing the same issue

shivkumar.mallesappa's picture
Joined: Mar 18 2015 - 11:59pm
Last seen: 3 years 7 months ago
0

I have also tried by making auth property false.

my application context file is as follows :

 <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}"/>-->    I have commented out user name and password and also made auth false so no authentication is required still I am facing same issue. 
        <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.sendpartial">true</prop>
                <prop key="mail.smtps.auth">false</prop>
                <prop key="mail.smtps.starttls.enable">true</prop>
</props>
shivkumar.mallesappa's picture
Joined: Mar 18 2015 - 11:59pm
Last seen: 3 years 7 months ago
0

Authentication error generally refers to wrong login credentials;
 

Also,

By default Gmail account is highly secured. When we use gmail smtp from non gmail tool, email is blocked.  To test in our local environment, make your gmail account less secure as;

1. Login to Gmail. 
2. Access the URL as https://www.google.com/settings/security/lesssecureapps 
3. Select "Turn on"

 

But firstly check the quartz file and make sure the login credentials and port are correct.

kkriplani's picture
858
Joined: Sep 4 2015 - 2:18am
Last seen: 2 weeks 6 days ago
0

Hi kkriplani,

 

The issue was with securiy access.
I tried with yahoo and it worked for me.
Thanks for you help.

shivkumar.mallesappa's picture
Joined: Mar 18 2015 - 11:59pm
Last seen: 3 years 7 months ago
Feedback