alaa56mm Posted August 12, 2007 Share Posted August 12, 2007 Dear ...I have a problem, when scheduling a job to execute a report , i have a problem in sending that report by email,i want to send that report to my gmail account,and i did the setting on : <jasper_intalation> <tomcat> webapps jasperserver WEB-INF js.mail.properties:as the following:Code:report.scheduler.mail.sender.host=smtp.gmail.comreport.scheduler.mail.sender.username=alaa56mmreport.scheduler.mail.sender.password=mypasswdreport.scheduler.mail.sender.from=alaa56mm@gmail.comreport.scheduler.mail.sender.protocol=smtpreport.scheduler.mail.sender.port=465 and i got exception as follows:javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465; nested exception is: java.net.ConnectException: Connection timed out: 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 timed out: 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 Post edited by: alaa56mm, at: 2007/08/12 09:59Post edited by: alaa56mm, at: 2007/08/12 11:38 Link to comment Share on other sites More sharing options...
contentengineer Posted August 13, 2007 Share Posted August 13, 2007 Can you connect to the mail server using telnet, for example: telnet smtp.gmail.com 465 You should get a EHLO or HELO on the screen. If not, then you need to check your mail settings including FQDN and port number. Link to comment Share on other sites More sharing options...
anandharaj Posted August 13, 2007 Share Posted August 13, 2007 Hi, There is some post on how to use Gmail to send email from JS. Besides editing js.mail.properties, you also need to edit applicationContext-report-scheduling.xml to include the SMTP authentication. Link to comment Share on other sites More sharing options...
alaa56mm Posted August 13, 2007 Author Share Posted August 13, 2007 Dear .. the applicationContext-report-scheduling.xml read the configuration from js.mail.properties , and what i should do in the applicationContext-report-scheduling.xml Regards 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