Configuring an SSRS Server to send email via a local SMTP server

SSRS Servers <= 2014 cannot be configured to send email using a password. And in this day and age, what idiot allows their email server to relay unauthenticated email?

If you have any interest in SSRS, please remember where this blog entry is, you'll want it, and it'll save you the days that I've spent on this.

This article will walk you through setting up a mail server on a Server 2012 box with SQL 2014, and then configuring the mail server to only accept connections from the SQL server. This provides the security that we need to be sure that we're not an open relay.

Here we go:

What follows can be grouped into three steps: Installing the SMTP server, configuring the SMTP server, and configuring SSRS to use the local server.

Installing the SMTP Server

Open Server Manager, click on Local Server (on the left) and then Manage > Add Roles and Features

Click Next

Click Next

Click Next

Click Next

 

Select the SMTP Server and click Next

You'll get the confirm form below. Click Add Features.

Note that IIS 6 is also being installed, that's where we'll manage this

I clicked restart... but it didn't. Click Install

 

Part Two: Configuring the SMTP Server

Back in the Server Manager, click on the IIS 6 Manager

Expand to the SMTP Server node, right click, select properties

Click on the access tab

We're going into all three buttons: Authentication, Connection, Relay

Leave this Anonymous

This is the Connection window, and here is the magic. Configure as shown below. This will ensure that only this machine can send mail.

Click OK to the confirmation.

This is the Relay Restriction window

 

Cick OK to the confirmation

You might want to put an address in the 'Non-Delivery' text box below.

Take the defaults, click on Outbound Security

Confirm that it says anonymous, click OK

OK, all done there.

Go into the Services applet and set the SMTP service to start automatically.

Your SSRS report must not require a password, the data source must have a username/password stored in it. I created a report called EmailTest that had a stored password. Dropdown the menu, choose manage

On the Subscriptions tab, choose New Subscription

 

 

Fill this in as required, and you're done.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences