I am trying to send scheduled reports as email attachments from JasperServer 5.6. Here's what I have configured
/home/ubuntu/JasperServer/apache-tomcat/webapps/jasperserver/WEB-INF/js.quartz.properties
# This file is now just a pass-through for stuff in the # file referenced by the Maven js.quartz.properties file. quartz.delegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate quartz.tablePrefix=QRTZ_ quartz.extraSettings= report.scheduler.mail.sender.host=smtp.google.com report.scheduler.mail.sender.username=xxx@gmail.com report.scheduler.mail.sender.password=xxx report.scheduler.mail.sender.from=xxx@gmail.com report.scheduler.mail.sender.protocol=smtp report.scheduler.mail.sender.port=587 report.scheduler.web.deployment.uri=http://ubuntu.xxx.com:8080/jasperserver
/home/ubuntu/JasperServer/apache-tomcat/webapps/jasperserver/WEB-INF/applicationContext-report-scheduling.xml
<property name="javaMailProperties"> <props> <prop key="mail.smtp.auth">true</prop> <prop key="mail.smtp.starttls.enable">true</prop> </props> </property>
But I get the following error
Could not connect to SMTP host: smtp.google.com, port: 587
My JasperServer is on a VirtualBox VM which can access the internet. I cannot telnet smtp.google.com on port 587 either on the VM or the Host Machine (and I am able to connect to the internet on both). Any hints as to what I may be doing wrong?
3 Answers:
Try:
report.scheduler.mail.sender.protocol=smtps
report.scheduler.mail.sender.port=465
Now I get this
The job error notification was not completed. An error occurred while sending it.
org.springframework.mail.MailSendException: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257
My credentials are okay and I followed the steps in the link. Oh - and I had to change smtp.google.com to smtp.gmail.com
Changes I had to make to get this working
report.scheduler.mail.sender.host=smtp.gmail.com
report.scheduler.mail.sender.protocol=smtps
report.scheduler.mail.sender.port=465
<prop key="mail.smtps.auth">true</prop>
<prop key="mail.smtps.starttls.enable">true</prop>