Recently I was trying to configure SSRS Report subscription. I checked some links in the MSDN and by following those steps I was unable to configure it. The reason was I used the SMTP server as
smtp.gmail.com since we are not having a local smtp server. To use the smtp.gmail.com as the smtp server we need to follow some additional steps other than the steps mentioned
here.
The first step is we need to configure a Virtual SMTP server.
First make sure that the SMTP Feature is installed on your server, if not installed it.
Then use IIS Manager to configure the virtual SMTP server. I am using Windows Server 2008 and it has both the IIS 6 and IIS 7.
To configure virtual SMTP server we have to use IIS 6.
Open the IIS 6.0 Manager and you will get a screen as below.
In that if the SMTP Virtual Server is not started, then start it. Then right click on it and select
Properties.
You will get a screen as given below.
In the
General tab select the
IP Address value and unmarked the
Limit Number of Connections to field.
Then go to the
Access tab and click on the
Relay button at the bottom. Then select
All except the list below and click
OK.
Then go to the
Delivery tab you will get a screen as below.
Click on the
Outbound Security... button. In that select
Basic Authentication and provide the gmail user name and the password as shown below. Also select the
TLS encryption as well.
Click OK and then click on the
Outbound connections... button.
In that change the
TCP port value to
587 and click OK.
Then click on the
Advanced button in the Delivery tab. Then provide the
Smart host value as
smtp.gmail.com and also check whether the
Fully-qualified domain name is correct.
Then click OK on both the Advanced Delivery window and the Properties windows. That is it and now you completed configuring virtual SMTP server.
The next step is to use that virtual SMTP server to configure Reporting Services.
To configure it run the
Reporting Service Configuration Manager. Connect to the Reporting Service instance and select
Email Settings. You will get a screen as shown below.
In that provide the
Sender Address which is used to send mails. For the
SMTP Server value, provide the
IP Address given for the virtual SMTP Server. Click Apply.
But still it is not completed. You have to modify the
rsreportserver.config file which can be found at C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer.
The rsreportserver.config contains a property as SendUsing which specify whether a local SMTP Server (SendUsing =1) is used or a Remote SMTP server (SendUsing =2) is used to send mails.
Since we are using virtual SMTP server we need to set the value as 1.
The other property we need to set is SMTPServerPickupDirectory value which specifies the local pickup directory. We need to set that value in the rsreportserver.config file as well and for my example it is as C:\inetpub\mailroot\Pickup. Then save the rsreportserver.config file.
You will complete the configuring Reporting Service E-mail Delivery after saving the rsreportserver.config file. That is it.
Now go to the Report Server and click the down arrow of the relevant report and select Manage. In that select Subscriptions and create a New Subscription. In that page select the report delivery option as E-mail and provide other required values.
After that you will get e-mails according to the given schedule.