I have a Classic ASP page that creates a CDO.Message
object to send email. The code works on Window Server 2003 but not 2008. On 2008 an "Access is denied" error gets thrown. Here is a simple test page I wrote to diagnose the problem. How can I get this to work on Windows Server 2008?
dim myMail
Set myMail=CreateObject("CDO.Message")
If Err.Number <> 0 Then
Response.Write ("Error Occurred: ")
Response.Write (Err.Description)
Else
Response.Write ("CDO.Message was created")
myMail.Subject="Sending email with CDO"
myMail.From="sender@mycompany.com"
myMail.To="recipient@mycompany.com"
myMail.TextBody="This is a message."
myMail.Send
set myMail=nothing
End If