How do I configure SQL Server 2005 Reporting Services (SSRS) to email a report via a remote SMTP server?
reporting, reporting-services, smtp
Solution
Here are the steps to set this up using only Microsoft SSRS/Windows Server 2003 components.
1) Install SMTP server in Add/Remove programs / App Server / IIS In IIS Manager: 2) add the domain (as a remote type) you will be sending as such as yourwebsite.com 3) Under Default SMTP Virtual Server properties / delivery tab / advaced button, add your remote smtp server in the smart host field. 4) Under Default SMTP Virtual Server properties / delivery tab / Outbound security button, choose Basic Authentication, user name = SMTP user name, password = SMTP password
In the rsreportserver.config file (sql drive:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer): 5) Populate `<SMTPServer>x.x.x.x</SMTPServer>` with the IP of the machine where you just setup the SMTP server. 6) Populate `<From>you@yourwebserver.com</From>` 7) Change this one to false `<SendEmailToUserAlias>False</SendEmailToUserAlias>` 8) Lastly, make sure you setup the domain as a permitted host such as this: `<PermittedHosts>` `<HostName>yourwebsite.com</HostName>` `</PermittedHosts>`
As far as why SMTP basic authenication isn't supported directly in SSRS seems to be by design. The best explaination I could find was here on this MSDN forum:
As one poster here mentions, there is a Microsoft Connect ticket open for people who are requesting this functionality.
Problem
How do I configure SSRS/Windows Server 2003, so that I can setup email delivery via a remote SMTP server that requires username and password. I can configure SSRS with an SMTP address and other parameters, but nowhere is it possible to configure it with smtp username and password. I have hunted around, but can only find vague reference to setting up some sort of relay, to cover up the bizarre lack of smtp functionality that SSRS has out of the box. Any ideas?