diegolimahif Posted April 7, 2021 Share Posted April 7, 2021 I'm having a hard time configuring Jasper to send some reports by email.I did a lot of research and tests with some of the questions from some colleagues here, but unfortunately I still haven't been able to solve the problem.I made the file settings as in the example below and I still keep getting an error message.js.quartz.base.properties:report.scheduler.mail.sender.host=smtp.office365.comreport.scheduler.mail.sender.username=mailaddressreport.scheduler.mail.sender.password=mailpassreport.scheduler.mail.sender.from=mailaddressreport.scheduler.mail.sender.protocol=smtpreport.scheduler.mail.sender.port=587report.scheduler.mail.smtp.starttls.enable=truereport.scheduler.mail.smtp.auth=true Add the <prop key="mail.smtps.starttls.enable">true</prop> on pplicationContext.xml and applicationContext-report-scheduling.xml files. The error message warned that STARTTLS is required to send mail, as bellow:ERROR ReportExecutionJob, quartzScheduler_Worker-2: 354 - fail to send out alert mail notificationorg.springframework.mail.MailSendException: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 451 5.7.3 STARTTLS is required to send mail [CP5P284CA0075.BRAP284.PROD.OUTLOOK.COM]; message exception details (1) are:Failed message 1:com.sun.mail.smtp.SMTPSendFailedException: 451 5.7.3 STARTTLS is required to send mail [CP5P284CA0075.BRAP284.PROD.OUTLOOK.COM] When i changed the smtp options in the js.quartz.base.properties, applicationContext.xml and applicationContext-report-scheduling.xml files to smtps the error changed to: Failed message 1:javax.mail.MessagingException: Exception reading response; nested exception is: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462) at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370) at javax.mail.Service.connect(Service.java:275) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389) 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:767) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:594) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:243) 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.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? at sun.security.ssl.InputRecord.handleUnknownRecord(Unknown Source) at sun.security.ssl.InputRecord.read(Unknown Source) at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source) at sun.security.ssl.AppInputStream.read(Unknown Source) at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75) at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440) ... 13 moreIs there any other configuration I need to do to correct this error? Link to comment Share on other sites More sharing options...
mbucangmail.com Posted May 23, 2022 Share Posted May 23, 2022 Hello, check this out, this should solve your problem,https://community.jaspersoft.com/wiki/use-office-365-smtp-jasperreports-server Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now