#1 2021-12-02 04:31:41

NatalieNish
Member
Registered: 2021-10-14

Sending reports via mail

Hi,

I want to mail the reports to the users who have only execute permission to the reports without log in. This should be done when the user is downloading the report without login in using that API key method.  Is this possible? If possible, can you please add the steps for that with the email configurations?

Thank you,
Natalie.

Last edited by NatalieNish (2021-12-02 07:16:54)

Offline

#2 2021-12-02 08:14:29

NatalieNish
Member
Registered: 2021-10-14

Re: Sending reports via mail

Hi,

I tried configuring the email by updating the mail.cf file.  But no luck I am getting the following error.

Could not export report via mail: Unable to provision, see the following errors:

1) null returned by binding at net.datenwerke.rs.core.service.mail.MailModule.provideSmtpHost()
but the 2nd parameter of net.datenwerke.rs.core.service.mail.MailModule.provideSession(MailModule.java:117) is not @Nullable
at net.datenwerke.rs.core.service.mail.MailModule.provideSmtpHost(MailModule.java:165)
at net.datenwerke.rs.core.service.mail.MailModule.provideSmtpHost(MailModule.java:165)
while locating java.lang.String annotated with @net.datenwerke.rs.core.service.mail.annotations.MailModuleSMTPHost()
for the 2nd parameter of net.datenwerke.rs.core.service.mail.MailModule.provideSession(MailModule.java:117)
at net.datenwerke.rs.core.service.mail.MailModule.provideSession(MailModule.java:117)
while locating javax.mail.Session

1 error


My mail.cf looks like below.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
   <smtp>
      <host>smtp.gmail.com</host>
      <port>587</port>
      <!--<username>rs@host.net</username>
      <password></password>
      -->
      <ssl>false</ssl>
      <tls>
         <enable>false</enable>
         <require>false</require>
      </tls>
   </smtp>
   <mail>
      <sender>**********@*****.com</sender>
      <senderName>ReportServer</senderName>
      <forceSender>false</forceSender>
      <encryptionPolicy>allow_mixed</encryptionPolicy>
   </mail>
</configuration>

What is the problem here? I restarted the tomcat after doing the changes.

Thank you.

Offline

#3 2021-12-02 11:02:07

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Sending reports via mail

Hi NatalieNish,

did you reload configuration via "config reload" or restarted your reportserver?

Regards,
Eduardo

Offline

#4 2021-12-02 11:19:17

NatalieNish
Member
Registered: 2021-10-14

Re: Sending reports via mail

Hi,

I restarted the server. Where should I run this command?

Thanks

Offline

#5 2021-12-02 11:36:55

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Sending reports via mail

Hi NatalieNish,

you can either restart reportserver or use "config reload" as explained here: https://reportserver.net/en/guides/conf … iguration/

"Please note, that after changing a config file you need to run the terminal command config reload for the change to take effect."

But if you restart reportserver it should also work. Are you still getting this error?

Regards,
Eduardo

Offline

#6 2021-12-02 11:54:31

NatalieNish
Member
Registered: 2021-10-14

Re: Sending reports via mail

Hi,

Error is still there. The config files are in a zip folder, so that should I zip the folder again to work these?

Can I know if this is possible?

NatalieNish wrote:

I want to mail the reports to the users who have only execute permission to the reports without logging in. This should be done when the user is downloading the report without login in using that API key method.  Is this possible?

Thank you.

Last edited by NatalieNish (2021-12-02 11:56:16)

Offline

#7 2021-12-02 12:39:26

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Sending reports via mail

Hi NatalieNish,

in a zip folder?
No, I am talking about the reportserver config files, which you can see in your reportserver admin area as described here:
https://reportserver.net/en/guides/conf … iguration/

"All configuration files described in this section can be found in ReportServer's internal filesystem. You can access the internal filesystem using the administration module (administration/ file system) or using the terminal: you can open the terminal by pressing CTRL+ALT+T."

Regarding your other question, pls open a new thread for unrelated issues. I am not quite sure if I understand what you mean.

Regards,
Eduardo

Offline

#8 2021-12-03 03:14:10

NatalieNish
Member
Registered: 2021-10-14

Re: Sending reports via mail

Hi,

I ran 'reload config' and now it is no error on the front end side. But a warning is coming like below and the emails are not sent.

654 WARNING [pool-2-thread-1] net.datenwerke.rs.core.service.mail.MailServiceImpl.lambda$1 Mail could not be send
    net.datenwerke.rs.core.service.mail.exceptions.MailerRuntimeException: Mail could not be send
        at net.datenwerke.rs.core.service.mail.MailServiceImpl$MailSupervisorImpl.handleException(MailServiceImpl.java:76)
        at net.datenwerke.rs.core.service.mail.MailServiceImpl.sendMailSync(MailServiceImpl.java:340)
        at net.datenwerke.rs.core.service.mail.MailServiceImpl.lambda$1(MailServiceImpl.java:393)
        at net.datenwerke.rs.core.service.mail.MailServiceImpl$$Lambda$202/2042200728.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    Caused by: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. mv12sm189150pjb.36 - gsmtp

        at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2358)
        at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1823)
        at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1300)
        at javax.mail.Transport.send0(Transport.java:255)
        at javax.mail.Transport.send(Transport.java:124)
        at net.datenwerke.rs.core.service.mail.MailServiceImpl.sendMailSync(MailServiceImpl.java:330)
        ... 5 more

Thank you

Offline

Board footer

Powered by FluxBB