For anyone that has had the requirement to configure a Reporting Services instance to use a remote SMTP server using basic authentication it is sure a great frustration that basic authentication against a SMTP server is not support. There is however a way to get around this problem.
All of this can be achieved by using your own virtual SMTP server and setting up message relay with basic authentication to the remote SMTP server. Lets go through the steps to achieve this.
First you need to install the SMTP feature on your Windows Server instance. In this example I am using Windows Server 2008 R2. In Server Manager go to the features section and click on Add Features.
Select SMTP from the list of feature.
Click on “Add Required Role Services” when you are prompted. (This will added IIS and all the other services that are needed to run the SMTP server)
Click “Next” until you get the “Confirm Installation Selection” window and then click on “Install”.
Click on “Close” after the installation completes.
Next we need to setup our SMTP server to relay our emails via the remote SMTP server. Click on Start, Administrative Tools and then on Internet Information Services (IIS) 6.0 Manager. (Make sure to select the IIS 6.0 Manager)
Click on the + sign next to the server name to reveal the virtual SMTP server.
Right click on the SMTP Virtual Server and click on Properties. Under the general tab, select the IP address of for the SMTP server.
On the Access tab click on “Relay”. If you wish to limit the computers that are allowed to relay through this virtual SMTP server by specifying them explicitly then keep the “Only the list below” option selected and add the IP addresses, Domain or group of computers to the list by clicking on the “Add” button. If you want to allow all machines except certain ones to relay emails through the virtual SMTP server then you can select the “All except the list below” option and add machines you specifically want to deny access to into the list by click on the “add” button. (Keep in mind this will allow any machine to relay mail through this virtual SMTP server unless it is specifically blocked. As this is a testing Virtual Machine I have selected the second option)
Click “OK” and then click on the Delivery tab. On the Delivery tab click on “Outbound security”.
Select “Basic authentication” and specify the username and password that you need to use to authenticate to the remote SMTP server.
Click on “OK”. Next click on “Outbound connections”.
Here we will set the TCP port on which to connect to the SMTP server.
Click on “OK”. Next click on “Advanced” on the Delivery tab.
Here we will specify the address of the remote SMTP server in the “Smart host” textbox.
Click on “OK” twice to complete the setup of the SMTP server. The last thing that remains to be done is to configure Reporting Services to use our virtual SMTP server. You can do that by running the Reporting Services Configuration Manager utility.
Connect to you SSRS instance and then click on the “Email Settings” option.
Type in the email address that will be shown as the sender when SSRS sends emails. (This may be over written by the remote SMTP server so check to see if this is the case. In this example the Google SMTP server will replace any address that you enter here with the email address of the account used to authenticate to it and send emails with.)
In the “SMTP Server” textbox type the IP address that you selected for the virtual SMTP server.
Click on “Apply” and then “Exit” after the settings have been applied successfully.
Reporting Services is now configured to send emails via the local virtual SMTP server which will relay the emails using the Remote SMTP server using basic authentication.