Installing the Microsoft IIS SMTP Service on Windows Server 2008

The most popular blog post on my site is how to send email to ASP.NET (C# code sample). It seems that a recurring question/comment on that post though is from people with issues with the code being rejected when trying to relay email through “localhost” (an assumed running local SMTP service). So, here’s a post walking through the setup of Microsoft’s SMTP service on Windows Server 2008.

The process starts with the Windows Server 2008 Server Manager. From here choose Features then Add Features.

Win08Features

Your next screen presents a list of Features that are options to be installed. Scroll through the list and find the SMTP Server feature as shown.

Features2

Once you check that box another window will pop up letting you know that the IIS role is required for the SMTP services; so are the IIS6 management tools (don’t ask me why but Microsoft decided to leave SMTP management out of the IIS7 interface so you actually have to use the previous [IIS6] tools). Click the box to Add Required Role Services.

features3

That drops us back to the previous screen where you only need to click Next to get things started.

Features4

The next window that pops-up has a lot of words… read it if you are bored, or just click Next.

Features5

Okay, this next screen actually has some value – but more FYI than anything. You’ll notice that as part of the installation it is going to install the ODBC logging (so that you can have logging for your SMTP service), IIS6 Compatibility, and the IIS6 Management Tools (for the reason already mentioned). Don’t change anything here – just leave the defaults, since they are required, and click Next.

Features6

Now it’s time for an FYI screen… just in case you got this far by accident and wanted to cancel the installation.

Features7

Hey, look at that – we’re done! You now have Microsoft’s SMTP service installed locally on your Windows Server 2008 machine… and you can use it to relay email to your heart’s desire.

Features8

There’s still one more step to make this work properly though. It’s not part of the install so I’ll make that another post.

Configuring Microsoft’s SMTP Service to allow relay from code (or services) running locally on the server.

Happy hosting!

Be Sociable, Share!

    2 Comments.