Reporting Services send mail on behalf of

abarefoot
abarefoot used Ask the Experts™
on
We use MS Reporting Services to send out daily reports to some of our customers. Reporting services is configured with email@domain1.com. Before we switched to Office 365 from Gmail we were able to send some of our reports out through email@domain2.com. These would come across as "reporting services via Company 2 Support" with email@domain2.com showing as the from and reply-to address. I was not employed with this company at the time of setup and cannot figure out how this was done.

Basically, if reports are being sent to customers of company 1, show email@domain1.com.
If reports are being sent to customers of company 2, allow sending on behalf of email@domain2.com.

I know that reporting services will only allow one "from" email address. Is this possible to achieve through some other means? Through some sort of relay perhaps? Thanks in advance.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Robb HillSenior .Net Full Stack Developer

Commented:
SSMS can have more than one profile with more than one email.

Reporting services I dont think can.  

Perhaps you can leverage the mail profile
Adam BrownSenior Systems Admin
Top Expert 2010

Commented:
You would have to do direct send to their mail server through Reporting Services to accomplish this. Essentially, you would not authenticate to O365 to send the email. Exchange Online is configured with much tighter mail security standards than GMail, and it won't let you send email with a From: address that you don't own or on behalf of a From: address that you don't have verified in your Tenant. Gmail may let you do that, but they violate RFCs and general Email security principals by doing so.

In order to send mail with a From: address that you don't control, you could potentially use the send-mailmessage cmdlet in PowerShell. You would set up a powershell script that SSRS would initiate when sending email. That script would initiate an SMTP session with the incoming servers for the recipient domain. For this to work you *must* configure the receiving side's spam filters to allow any public IPs that the messages could come from through completely unmolested, or the message will get gobbled up.
Robb HillSenior .Net Full Stack Developer

Commented:

Author

Commented:
Hi, Adam. Thanks for the response. I should have mentioned, both of these are domains that we control and are verified in our Office 365 tenant.

Robb, thanks for the link. I will give it a read.
We moved back to our original relay that was already setup.  This allowed me to spoof the email address that is in SSRS setup.  I'm just going to hide the company name by doing something like Report@Services.com.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial