. With the new settings prompted during installation I just can't make it work.
Any help is greatly appreciated. This feature is a huge component of the production final tests I'm doing.
Thanks in advance.
19 Answers:
Any idea?
Code: |
<bean id="reportSchedulerMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"><br /> <property name="host" value="${report.scheduler.mail.sender.host}"/><br /> <property name="username" value="${report.scheduler.mail.sender.username}"/><br /> <property name="password" value="${report.scheduler.mail.sender.password}"/><br /> <property name="protocol" value="${report.scheduler.mail.sender.protocol}"/><br /> <property name="port" value="${report.scheduler.mail.sender.port}"/><br /> </bean><br /> </td></tr></tbody></table><br /> <br /> From http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/mail/javamail/JavaMailSenderImpl.html#setProtocol(java.lang.String)<br /> <br /> Protocol is a mail protocol, like 'SMTP'.<br /> <br /> Sherman<br /> JasperSoft |
Fixed that directly on the file and restarted the server. I got the following error with port 587:
Code: |
<br /> 11:07:43,944 ERROR ReportExecutionJob,JasperServerScheduler_Worker-0:179 - org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.NoSuchProviderException: No provider for SMTP<br /> org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.NoSuchProviderException: No provider for SMTP<br /> javax.mail.NoSuchProviderException: No provider for SMTP<br /> at javax.mail.Session.getProvider(Session.java:455)<br /> at javax.mail.Session.getTransport(Session.java:650)<br /> at javax.mail.Session.getTransport(Session.java:631)<br /> at org.springframework.mail.javamail.JavaMailSenderImpl.getTransport(JavaMailSenderImpl.java:412)<br /> at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:372)<br /> at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:326)<br /> at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:322)<br /> at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:483)<br /> at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendToDestinations(ReportExecutionJob.java:294)<br /> at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:131)<br /> at org.quartz.core.JobRunShell.run(JobRunShell.java:195)<br /> at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)<br /> </td></tr></tbody></table><br /> <br /> Changed the port to 465 and restarted the server. I'm still waiting for the email but at least I got no error in the log.<br /> <br /> I'll let you guys know if the email arrives. I guess it should now. |
11:41:39,251 ERROR ReportExecutionJob,JasperServerScheduler_Worker-1:179 - org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.NoSuchProviderException: No provider for SMTP org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.NoSuchProviderException: No provider for SMTP javax.mail.NoSuchProviderException: No provider for SMTP at javax.mail.Session.getProvider(Session.java:455) at javax.mail.Session.getTransport(Session.java:650) at javax.mail.Session.getTransport(Session.java:631) at org.springframework.mail.javamail.JavaMailSenderImpl.getTransport(JavaMailSenderImpl.java:412) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:372) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:326) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:322) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:483) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendToDestinations(ReportExecutionJob.java:294) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:131) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) |
Post edited by: javydreamercsw, at: 2006/10/31 14:43
This is also the only protocol that is currently supported (so the installer bug is that "smtp" should be the default).
Code: |
<br /> 07:55:05,952 ERROR ReportExecutionJob,JasperServerScheduler_Worker-1:179 - org.springframework.mail.MailSendException: Could not send mails: 530 5.7.0 Must issue a STARTTLS command first 5sm1693961nzk<br /> <br /> org.springframework.mail.MailSendException: Could not send mails: 530 5.7.0 Must issue a STARTTLS command first 5sm1693961nzk<br /> <br /> com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first 5sm1693961nzk<br /> <br /> at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)<br /> at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)<br /> at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)<br /> at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:382)<br /> at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:326)<br /> at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:322)<br /> at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:483)<br /> at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendToDestinations(ReportExecutionJob.java:294)<br /> at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:131)<br /> at org.quartz.core.JobRunShell.run(JobRunShell.java:195)<br /> at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)</td></tr></tbody></table><br /> <br /> Thanks in advance! |
Code: |
<br /> <property name="javaMailProperties"><br /> <props><br /> <prop key="mail.smtp.auth">true</prop><br /> <prop key="mail.smtp.starttls.enable">true</prop><br /> </props><br /> </property><br /> </td></tr></tbody></table><br /> <br /> to the "reportSchedulerMailSender" bean in applicationContext-report-scheduling.xml.<br /> <br /> Setting mail.smtp.auth seems a little redundant, since ideally it should be implied by a non-empty username. We'll have to think whether we can do something about this..<br /> <br /> Regards,<br /> Lucian |
it always gave me the error says:
Code: |
Job: test (ID: 11)<br /> Report unit: /reports/samples/SalesByMonth<br /> Quartz Job: ReportJobs.job_11<br /> Quartz Trigger: ReportJobs.trigger_11_0<br /> Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;<br /> nested exception is:<br /> java.net.ConnectException: Connection refused: connect<br /> org.springframework.mail.MailSendException; nested exceptions (0) are:<br /> Caused by: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;<br /> nested exception is:<br /> java.net.ConnectException: Connection refused: connect<br /> at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282)<br /> at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)<br /> at javax.mail.Service.connect(Service.java:275)<br /> at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:382)<br /> at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:335)<br /> at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:331)<br /> at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:595)<br /> at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendToDestinations(ReportExecutionJob.java:357)<br /> at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:278)<br /> at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:148)<br /> at org.quartz.core.JobRunShell.run(JobRunShell.java:195)<br /> at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)<br /> Caused by: java.net.ConnectException: Connection refused: connect<br /> at java.net.PlainSocketImpl.socketConnect(Native Method)<br /> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)<br /> at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)<br /> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)<br /> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)<br /> at java.net.Socket.connect(Socket.java:516)<br /> at java.net.Socket.connect(Socket.java:466)<br /> at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)<br /> at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)<br /> at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)<br /> ... 11 more<br /> </td></tr></tbody></table><br /> i tried to change the js.mail.properties and add the property too. but still the same error message. is there anybody know how to fix it?<br /> thanks in advance.<br /> <br /> Best regards.<br /> <br /> Kelly |
Also make sure that the mailing info you provided during install are correct since there was a bug in which the settings wasn't transfered to the properties file properly (not sure of what version you're using).
The file is at [tomcat dir]/webapps/jasperserver/WEB-INF/js.mail
Hope that helps!
Post edited by: javydreamercsw, at: 2007/07/20 11:56
Lucien! This worked for me! Karma for you :-)
I repeated your post here:
http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=71124#71175
Post Edited by franzkrauth at 23/02/2010 08:31
Hello good people!
i know this thread is old and i've seen some slight differences in files which are supposed to be edited in the version 3.7 which are js.quartz.properties and applicationContext-report-scheduling. what differences i've seen here, is at the applicationContext-report-scheduling level :
<prop key="mail.smtp.starttls.enable">true</prop> is that ok just to add it?
Hello thanks for replying this.I 've realized that to use tls the port number has to be 587, and i just happened to noticed that it was said earlier.So after making that change i started having an entry in the the jasperserver.log file which i put with this poste.so is it a common error on jasperserver or it's has to go with my environement?anyway how to fix it? thanks for reading this
Code: |
2010-03-02 16:53:14,677 ERROR ReportExecutionJob,quartzScheduler_Worker-1:308 - An error occurred while sending job error notification. org.springframework.mail.MailSendException; nested exception details (1) are: Failed message 1: javax.mail.MessagingException: IOException while sending message; nested exception is: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary="----=_Part_0_1879321.1267548791209" at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:625) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:403) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:342) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:338) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:1259) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:445) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:231) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary="----=_Part_0_1879321.1267548791209" at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:870) at javax.activation.DataHandler.writeTo(DataHandler.java:301) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1350) at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1683) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:585) ... 8 more</td></tr></tbody></table> |
Hmmm, this could be an issue with using JDK 1.6. See this thread http://old.nabble.com/javax.activation.UnsupportedDataTypeException:-no-object-DCH-for-MIME-type-multipart-mixed-td12523671.html
Are you using JDK 1.6? If so, it looks like the workaround (from the above post) is to move the mail.jar from WEB-INF/lib to tomcat/common/lib (Tomcat 5.5) or tomcat/lib (Tomcat 6.X)
Sherman
Jaspersoft
hi folks,
i am getting below error when i tried to send email from jasper.
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtp.localhost.com, port: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect
in js.quartz.properties file:
report.scheduler.mail.sender.host=smtp.nandimsg.sonata.local.com
report.scheduler.mail.sender.username=chandrasekhar.k
report.scheduler.mail.sender.password=Lord@10c
report.scheduler.mail.sender.from=chandrasekhar.k@sonata-software.com
report.scheduler.mail.sender.protocol=smtp
report.scheduler.mail.sender.port=25
report.scheduler.web.deployment.uri= http://localhost:8484/jasperserver
in application-context-report-Scheduling.xml
<property name="javaMailProperties">
<props>
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.starttls.enable">true</prop>
</props>
</property>
i tried with gmail settings as well for the above
scheduling is working fine as set but email is not working
where i am doing wrong,
please help me to find where exactly the problem.
thanks much
hi email notification in jasper is working now.
when any organization using exchange server for mail communication dont use smtp as prefix for the host name.
please see the below working configuartion
Code: |
report.scheduler.mail.sender.host=webmail.sonata-software.com report.scheduler.mail.sender.username=chandrasekhar.k report.scheduler.mail.sender.password=Lord@10c report.scheduler.mail.sender.from=chandrasekhar.k@sonata-software.com report.scheduler.mail.sender.protocol=smtp report.scheduler.mail.sender.port=25 report.scheduler.web.deployment.uri=http://localhost:8484/jasperserver</td></tr></tbody></table> |