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.
- Go to
Turn Windows features on or off
- Turn on
Internet Information Services\Web Management Tools\IIS 6 Management Compatibility \IIS Metabase and IIS6 configuration compatibility
- Download and install
IIS Resource Kit Tools
: http://www.microsoft.com/en-us/download/details.aspx?id=17275
- Run
Metabase Explorer
as Administrator
- Right click
LM
, add new Key SmtpSvc
- Right click
LM\SmtpSvc
, add new Key 1
- 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)
- Create the folder you specified above, if not present
- Add Modify access to
IIS_IUSRS
to the folder you just created
- 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 = 'rob@example.com';
mailer.To = 'rob@example.com';
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.