#1 2020-08-06 07:33:09

unsi_2
Member
Registered: 2020-06-24

mail setfrom not working

when i specify
mail.setFrom(addressFrom)

it doesnt do nothing, the mail from of the mails remain the same


also when changing the sender in mail.cf does not take effect

does the server need to be restarted to make mail.cf changes work?

Offline

#2 2020-08-06 07:41:31

eduardo
Administrator
Registered: 2016-11-01
Website

Re: mail setfrom not working

Hi unsi_2,

you have to reload configuration:

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.

If you are using community edition, you have to restart ReportServer for reloading configuration.

Regards,
Eduardo

Offline

#3 2020-08-06 17:26:45

unsi_2
Member
Registered: 2020-06-24

Re: mail setfrom not working

many thanks Eduardo.

by any chance you have an example of mail.cf for using a MS exchange mail server?

Offline

#4 2020-08-07 06:59:46

eduardo
Administrator
Registered: 2016-11-01
Website

Re: mail setfrom not working

Hi unsi_2,

this worked for our Exchange 365 test server:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
   <smtp>
      <host>smtp.office365.com</host>
      <port>587</port>
      <username>username@office.com</username>
      <password>**********</password>

      <ssl>false</ssl>
      <tls>
         <enable>true</enable>
         <require>false</require> <!-- setting this to true also works -->
      </tls>
   </smtp>
   <mail>
      <sender>username@office.com</sender>
      <forceSender>false</forceSender>
      <encryptionPolicy>allow_mixed</encryptionPolicy>
   </mail>
</configuration>

Regards,
Eduardo

Offline

#5 2020-08-10 11:06:17

unsi_2
Member
Registered: 2020-06-24

Re: mail setfrom not working

many thanks, i managed to make it work, but dealing with certificates also.

the only thing is that the mail messages IDs, are created by RS, and should be created by exchange.

is there a way to avoid this? that exchange figures as the originating server in messageIDs, not RS.

Last edited by unsi_2 (2020-08-11 17:00:37)

Offline

#6 2020-08-24 06:48:31

eduardo
Administrator
Registered: 2016-11-01
Website

Re: mail setfrom not working

Hi unsi_2,

unsi_2 wrote:

the only thing is that the mail messages IDs, are created by RS, and should be created by exchange.

is there a way to avoid this? that exchange figures as the originating server in messageIDs, not RS.

what do you mean exactly with "mail messages IDs"?
I also don't quite understand this: "that exchange figures as the originating server in messageIDs, not RS."

Regards,
Eduardo

Offline

#7 2020-08-31 14:36:53

unsi_2
Member
Registered: 2020-06-24

Re: mail setfrom not working

yes, when you check the headers of the mail you find:


Message-ID: <xxxxxxxxxxxxxxxxxxxx.JavaMail.tomcat@NAMEOFREPORSERVER>

Instead of

Message-ID: <xxxxxxxxxxxxxxxxxxxx@NAME_of_excahnge_server>


this causes the mail be refused by certain servers


Regards

Offline

Board footer

Powered by FluxBB