"Could not access 'CDO.Message' Object - Part 2
The following suggestion comes from Duncan Smart. Although I haven't tested this, it looks interesting and may help someone out. One note, use at your own risk, as you will be modifing the IIS metabase.
The following exerpt is from Duncan:
Having had a look at http://systemwebmail.com/faq I thought you and your
readers would find the following useful.
Below is a script we use when deploying our application. When you don't
set the SmtpServer property (or set it to null) then CDO tries to use a
local IIS SMTP service if installed, and sends emails by simply creating
a text file to c:\inetpub\mailroot\pickup\. The "Could not access
CDO.Message object" error message is due to CDO not being able to read
the IIS metabase to locate the PickupDirectory value - which is where it
will write emails to. This script allows ASPNET to look up the
PickupDirectory value from the IIS metabase. In addition you might need
to grant ASPNET access to the pickup directory itself
For more control over MetaBase ACLs then use the MetaAcl.vbs utility:
Hope you, or someone finds it useful!
[ vbscript ]
Dim obj, acl, ace, aspNetAce
Set obj = GetObject("IIS://localhost/SMTPSVC")
Set acl = obj.AdminAcl
Dim aspNetAcePresent : aspNetAcePresent = false
' Find "machine\ASPNET" access control entry
For Each ace in acl.DiscretionaryACL
If endsWith(ace.Trustee, "\ASPNET") Then
aspNetAcePresent = True
If Not aspNetAcePresent Then
Set ace = CreateObject("AccessControlEntry")
ace.Trustee = "ASPNET"
ace.AccessMask = &H1 ' Read access
' Save changes
obj.AdminAcl = acl
WScript.Echo "ASPNET account granted Read access to
WScript.Echo "ASPNET account already has access to
Function endsWith(str1, suffix)
EndsWith = (Mid(str1,Len(str1)-Len(suffix)+1) = suffix)
Copyright © 2004 Contact: Dave Wanta.