How can I configure mail to be sent without authentication

1

Hi

I am having some problems with sending mails with scheduled reports.

ERROR ReportExecutionJob,quartzScheduler_Worker-2:304 - 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: No authentication mechansims supported by both server and client 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:123) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:920) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:521) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:215) at org.quartz.core.JobRunShell.run(JobRunShell.java:213) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) Caused by: javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:756) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:669) at javax.mail.Service.connect(Service.java:295) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389) ... 8 more

Our mailserver is Microsoft Exchange, its setup to not require authentication for internal mail, I suspect that this is what is causing the problem, jasperservir is connecting to the smtp server with username and password credentials. How do I configure jasperserver to use no authentication when sending mails?

Thanks in advance

Gideon

applicationContext-report-scheduling.xml


       
       
       
       
       
       
           
                false
           

       

   

js.quartz.properties

quartz.delegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate

quartz.tablePrefix=QRTZ_

quartz.extraSettings=

report.scheduler.mail.sender.host=smtp.mydomain.com
report.scheduler.mail.sender.username=
report.scheduler.mail.sender.password=
report.scheduler.mail.sender.from=reports@mydomain.com
report.scheduler.mail.sender.protocol=smtp
report.scheduler.mail.sender.port=25

report.scheduler.web.deployment.uri=http://mydomain.com
 

gideon.maree's picture
Joined: Nov 27 2012 - 12:17am
Last seen: 5 years 8 months ago

1 Answer:

1

Figured it out, I just removed the username and password properties from applicationContext-report-scheduling.xml and it worked

gideon.maree's picture
Joined: Nov 27 2012 - 12:17am
Last seen: 5 years 8 months ago
Feedback
randomness