How to configure mail server settings in JasperRep

2019-04-11 05:54发布

问题:

I'm using JasperReports Server 4.0.0 and I want how to configure mail server settings to mail the reports by report scheduling.

How I can do that? Does anyone know this?

回答1:

Yahoo settings are:

Yahoo! Mail SMTP server address: smtp.mail.yahoo.com
Yahoo! Mail SMTP user name: full email address (including "@yahoo.com")
Yahoo! Mail SMTP password: Your Yahoo! Mail password
Yahoo! Mail SMTP port: 25

So it would be:

# 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.mail.yahoo.com
report.scheduler.mail.sender.username= Your full Yahoo! Mail email address (including "@yahoo.com")
report.scheduler.mail.sender.password= Your Yahoo! Mail password
report.scheduler.mail.sender.from=Your Full Yahoo Email
report.scheduler.mail.sender.protocol=smtp
report.scheduler.mail.sender.port=25


回答2:

You should edit the <app-server>/<deployment>/WEB-INF/js.quartz.properties configuration file.

The quote from the JasperReports Server Community Project Installation Guide (6.4.1 Mail Server Configuration Settings ).

  • report.scheduler.mail.sender.host - The name of the computer hosting the mail server
  • report.scheduler.mail.sender.username - The name of the user in the mail server that JasperReports Server can use
  • report.scheduler.mail.sender.password - The password of the mail server user
  • report.scheduler.mail.sender.from - The address that appears in the From field on email notifications
  • report.scheduler.mail.sender.protocol - The protocol that the mail server uses. JasperReports Server only supports SMTP. Note: Your entry must be lower case. For example: smtp
  • report.scheduler.mail.sender.port - The port number that the mail server uses. For SMTP, the default is typically 25 (values other than 25 may not work in earlier JasperServer versions)