Jump to content
We've recently updated our Privacy Statement, available here ×

What are the setting values in order to use Gmail


javydreamercsw

Recommended Posts

In version 1.0.1 I was able to use the scheduler after the changes in the artifact: http://www.jasperforge.org/sf/go/artf1170;jsessionid=4B8B5B93F34AE5756F543B7C2CB4DDF8?nav=1

. 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.

Link to comment
Share on other sites

  • Replies 19
  • Created
  • Last Reply

Top Posters In This Topic

The relevant configuration is in ?WEB-INF/applicationContext-report-scheduling:

 

 

Code:
	<bean id="reportSchedulerMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<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}"/>
<property name="protocol" value="${report.scheduler.mail.sender.protocol}"/>
<property name="port" value="${report.scheduler.mail.sender.port}"/>
</bean>

 

From http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/mail/javamail/JavaMailSenderImpl.html#setProtocol(java.lang.String)

 

Protocol is a mail protocol, like 'SMTP'.

 

Sherman

JasperSoft

Link to comment
Share on other sites

Thanks for the feedback. Just want to point out that it doesn't matter what you write down in the installer for the port it always writes 25 to the js.mail.properties file.

 

Fixed that directly on the file and restarted the server. I got the following error with port 587:

 

Code:

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
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)

 

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.

 

I'll let you guys know if the email arrives. I guess it should now.

Link to comment
Share on other sites

Got an error also... Looks to be another thing...

 

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

Link to comment
Share on other sites

Hi All, the installer has an "informational bug" regarding the js.mail.properties setting. The protocol setting needs to be "smtp" (note the non-capitalization).

 

This is also the only protocol that is currently supported (so the installer bug is that "smtp" should be the default).

Link to comment
Share on other sites

Looks like we are getting closer. Now I do get a response from the smtp server (after setting protocol to 'smtp') but sadly is an error:

 

Code:

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

org.springframework.mail.MailSendException: Could not send mails: 530 5.7.0 Must issue a STARTTLS command first 5sm1693961nzk

com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first 5sm1693961nzk

at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:382)
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)

 

Thanks in advance!

Link to comment
Share on other sites

Add

Code:

<property name="javaMailProperties">
<props>
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.starttls.enable">true</prop>
</props>
</property>

 

to the "reportSchedulerMailSender" bean in applicationContext-report-scheduling.xml.

 

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..

 

Regards,

Lucian

Link to comment
Share on other sites

  • 8 months later...

I have sending email problem too.

it always gave me the error says:

Code:
Job: test (ID: 11)
Report unit: /reports/samples/SalesByMonth
Quartz Job: ReportJobs.job_11
Quartz Trigger: ReportJobs.trigger_11_0
Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect
org.springframework.mail.MailSendException; nested exceptions (0) are:
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282)
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:382)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:335)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:331)
at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:595)
at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendToDestinations(ReportExecutionJob.java:357)
at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:278)
at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:148)
at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:516)
at java.net.Socket.connect(Socket.java:466)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
... 11 more

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?

thanks in advance.

 

Best regards.

 

Kelly

Link to comment
Share on other sites

Based on the stack trace it seems that you're either connecting to the wrong smtp server address and/or port. Verify those first.

 

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

Link to comment
Share on other sites

  • 2 years later...

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 year later...

 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

 

 
Link to comment
Share on other sites

 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.comreport.scheduler.mail.sender.username=chandrasekhar.kreport.scheduler.mail.sender.password=Lord@10creport.scheduler.mail.sender.from=chandrasekhar.k@sonata-software.comreport.scheduler.mail.sender.protocol=smtpreport.scheduler.mail.sender.port=25report.scheduler.web.deployment.uri=http://localhost:8484/jasperserver
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...