Jump to content
Changes to the Jaspersoft community edition download ×

Couldn't send mail to other domain


anandharaj

Recommended Posts

Hi,

 

Im getting an error (Invalid Address) when try send the report to other domain. For example in js.mail.properties, i have

Code:
report.scheduler.mail.sender.host=host.com
report.scheduler.mail.sender.username=username
report.scheduler.mail.sender.password=password
report.scheduler.mail.sender.from=from@host.com
report.scheduler.mail.sender.protocol=smtp
report.scheduler.mail.sender.port=25

 

Then i got the error if the recipient are:

user@abc.com, user1@test.com etc...

 

If the recipient is user@host.com, then no problem

 

Code:
[code]org.springframework.mail.MailSendException: Could not send mails: Invalid Addresses
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 Relaying denied, SMTP Authentication required. Please contact your email service provider. - 60.48.
;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 Relaying denied, SMTP Authentication required. Please contact your email service provider. - 60.48.
;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 Relaying denied, SMTP Authentication required. Please contact your email service provider. - 60.48.

at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
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:536)
at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendToDestinations(ReportExecutionJob.java:304)
at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:141)
at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 Relaying denied, SMTP Authentication required. Please contact your email service provider. - 60.48.
;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 Relaying denied, SMTP Authentication required. Please contact your email service provider. - 60.48.

at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)
... 9 more
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 Relaying denied, SMTP Authentication required. Please contact your email service provider. - 60.48.

... 10 more

 

Am i missing something?

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Try this: edit $JASPERSERVER/WEB-INF/applicationContext-report-scheduling.xml, find the "reportSchedulerMailSender" bean and add this property to the bean:

Code:

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

 

Depending on your SMTP server configuration, you might need to set other properties as well.

 

HTH,

Lucian

Link to comment
Share on other sites

  • 4 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 error message, you are trying to connect SMTP server which is located in same machine where the JS running.

 

Are you sure your js.mail.properties is correct?

 

If your mail server require authentication to sent email, then dont forget to add that properties in $JASPERSERVER/WEB-INF/applicationContext-report-scheduling.xml which was post by Lucianc

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