Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable SMTP for IIS 8?

I can't find where to enable the SMTP on Windows 8 Pro. Surprisingly enough I didn't even find answers online. Has anyone figured this out yet?

As usual I checked that all necessary IIS components were installed:

enter image description here

Still no SMTP configuration on inetmgr:

enter image description here

like image 392
eestein Avatar asked Mar 14 '13 19:03

eestein


People also ask

How do I enable SMTP in IIS?

Open Server Manager by right-clicking on My Computer, and selecting Manage. (Alternately, open Control Panel, click on Programs and Features, and then select Turn Windows features on or off.) Under Features, select Add Features. Select the SMTP Server check box.

Where is IIS SMTP server?

SMTP server setup You can manage your SMTP server through Internet Information Services (IIS) Manager 6. To open IIS, go to Server Manager and in the menu in the upper right corner select “Tools” -> “IIS 6.0 Manager”. Expand the branch with the server name, select SMTP Virtual Server and open its properties.


2 Answers

Windows 8 no longer allows SMTP Server, just merely SMTP Service. You can forward to a server with existing SMTP capabilities but no longer will it act as a server in IIS.

Reference: http://www.neatcomponents.com/enable-SMTP-in-Windows-8

like image 96
apollosoftware.org Avatar answered Sep 24 '22 12:09

apollosoftware.org


Here's an answer that may help a few people. I have just set up a development server on Windows 8.1 Pro that has a number of legacy classic ASP sites that I still need to support, and I really didn't want to change all the mail code.

Lots of answers across the web tell you to just install the IIS6 compatibility, however I believe this is for server OSes only - it does not work on Windows 8 Pro. The IIS6 snapin just says the SMTP Service is not installed when you try to connect.

CAVEAT: This is only useful for development; it allows you to continue using the CDO pickup code to put emails in a Pickup directory with no errors so you can see and debug the email you applications are sending, but it WILL NOT actually send anything.

  1. Go to Turn Windows features on or off
  2. Turn on Internet Information Services\Web Management Tools\IIS 6 Management Compatibility \IIS Metabase and IIS6 configuration compatibility
  3. Download and install IIS Resource Kit Tools: http://www.microsoft.com/en-us/download/details.aspx?id=17275
  4. Run Metabase Explorer as Administrator
  5. Right click LM, add new Key SmtpSvc
  6. Right click LM\SmtpSvc, add new Key 1
  7. Right click LM\SmtpSvc\1, add new String Record PickupDirectory, with the directory of your choice (I just created a \inetpub\mailroot\Pickup for familiarity's sake)
  8. Create the folder you specified above, if not present
  9. Add Modify access to IIS_IUSRS to the folder you just created
  10. Restart IIS from the normal IIS manager

All of your legacy CDO pickup-using code should now drop emails in that directory. Here is simple test page to check:

<%@ language="JScript" %>
<%
        var mailer = Server.CreateObject('CDO.Message');

        mailer.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1; 
        mailer.Configuration.Fields.Update();

        mailer.From = '[email protected]';
        mailer.To = '[email protected]';
        mailer.Subject = 'Test';

        mailer.TextBody = 'Blah blah';

        mailer.Send();
%>

You will get an error about the pickup directory not being specified if the metabase setup hasn't worked, an access denied error if you haven't set permissions on the directory correctly, and nothing at all if it's worked.

like image 38
Whelkaholism Avatar answered Sep 21 '22 12:09

Whelkaholism